@@ -16,44 +16,39 @@ public class Grandchild : Child {
16
16
override public func foo() { super.foo() }
17
17
}
18
18
19
- // test.Parent.foo () -> ()
20
- sil @_TFC4test6Parent3foofT_T_ : $@convention(method) (@guaranteed Parent) -> () {
21
- // %0 // user: %1
19
+ sil @Parent_foo : $@convention(method) (@guaranteed Parent) -> () {
22
20
bb0(%0 : $Parent):
23
- debug_value %0 : $Parent // let self // id: %1
24
- %2 = tuple () // user: %3
25
- return %2 : $() // id: %3
21
+ debug_value %0 : $Parent
22
+ %2 = tuple ()
23
+ return %2 : $()
26
24
}
27
25
28
- // test.Grandchild.foo () -> ()
29
- sil @_TFC4test10Grandchild3foofT_T_ : $@convention(method) (@guaranteed Grandchild) -> () {
30
- // %0 // users: %1, %2, %3
26
+ sil @Grandchild_foo : $@convention(method) (@guaranteed Grandchild) -> () {
31
27
bb0(%0 : $Grandchild):
32
- debug_value %0 : $Grandchild // let self // id: %1
33
- strong_retain %0 : $Grandchild // id: %2
34
- %3 = upcast %0 : $Grandchild to $Child // user: %4
35
- %4 = upcast %3 : $Child to $Parent // users: %6, %7
36
- // function_ref test.Parent.foo () -> ()
28
+ debug_value %0 : $Grandchild
29
+ strong_retain %0 : $Grandchild
30
+ %3 = upcast %0 : $Grandchild to $Child
31
+ %4 = upcast %3 : $Child to $Parent
37
32
%5 = super_method %0 : $Grandchild, #Parent.foo!1 : (Parent) -> () -> (), $@convention(method) (@guaranteed Parent) -> ()
38
33
%6 = apply %5(%4) : $@convention(method) (@guaranteed Parent) -> ()
39
- strong_release %4 : $Parent // id: %7
40
- %8 = tuple () // user: %9
41
- return %8 : $() // id: %9
34
+ strong_release %4 : $Parent
35
+ %8 = tuple ()
36
+ return %8 : $()
42
37
}
43
38
44
39
sil_vtable Parent {
45
- #Parent.foo!1: _TFC4test6Parent3foofT_T_ // test.Parent.foo () -> ()
40
+ #Parent.foo!1: Parent_foo
46
41
}
47
42
48
43
sil_vtable Child {
49
- #Parent.foo!1: _TFC4test6Parent3foofT_T_ // test.Parent.foo () -> ()
44
+ #Parent.foo!1: Parent_foo
50
45
}
51
46
52
47
sil_vtable Grandchild {
53
- #Parent.foo!1: _TFC4test10Grandchild3foofT_T_ // test.Grandchild.foo () -> ()
48
+ #Parent.foo!1: Grandchild_foo
54
49
}
55
50
56
- // CHECK: define void @_TFC4test10Grandchild3foofT_T_ (%C21super_instance_method10Grandchild*)
51
+ // CHECK: define void @Grandchild_foo (%C21super_instance_method10Grandchild*)
57
52
// CHECK: [[OPAQUE_GRANDCHILD:%[0-9]+]] = bitcast %C21super_instance_method10Grandchild* %0 to %swift.type**
58
53
// CHECK: [[GRANDCHILD_METADATA:%\..*]] = load %swift.type*, %swift.type** [[OPAQUE_GRANDCHILD]]
59
54
// CHECK: [[OPAQUE_METADATA:%[0-9]+]] = bitcast %swift.type* [[GRANDCHILD_METADATA]] to %swift.type**
@@ -62,3 +57,4 @@ sil_vtable Grandchild {
62
57
// CHECK: [[FOO_VTABLE_SLOT:%[0-9]+]] = getelementptr inbounds void (%C21super_instance_method6Parent*)*, void (%C21super_instance_method6Parent*)**
63
58
// CHECK: [[FOO_FNPTR:%[0-9]+]] = load void (%C21super_instance_method6Parent*)*, void (%C21super_instance_method6Parent*)** [[FOO_VTABLE_SLOT]]
64
59
// CHECK: call void
60
+
0 commit comments