1
- // RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s
1
+ // RUN: %target-swift-frontend -use-native-super-method - emit-silgen %s | FileCheck %s
2
2
3
3
class Foo {
4
4
init ( ) { }
@@ -14,7 +14,7 @@ class Bar: Foo {
14
14
// CHECK-NOT: strong_retain [[ORIG_SELF]]
15
15
// CHECK: [[ORIG_SELF_UP:%.*]] = upcast [[ORIG_SELF]]
16
16
// CHECK-NOT: strong_retain [[ORIG_SELF_UP]]
17
- // CHECK: [[SUPER_INIT:%.*]] = function_ref @_TFC22super_init_refcounting3Fooc
17
+ // CHECK: [[SUPER_INIT:%[0-9]+]] = super_method [[ORIG_SELF]] : $Bar, #Foo.init!initializer.1
18
18
// CHECK: [[NEW_SELF:%.*]] = apply [[SUPER_INIT]]([[ORIG_SELF_UP]])
19
19
// CHECK: [[NEW_SELF_DOWN:%.*]] = unchecked_ref_cast [[NEW_SELF]]
20
20
// CHECK: store [[NEW_SELF_DOWN]] to [[SELF_MUI]]
@@ -42,7 +42,7 @@ class Zim: Foo {
42
42
// CHECK-LABEL: sil hidden @_TFC22super_init_refcounting3Zimc
43
43
// CHECK-NOT: strong_retain
44
44
// CHECK-NOT: strong_release
45
- // CHECK: function_ref @_TFC22super_init_refcounting3Fooc
45
+ // CHECK: super_method {{%[0-9]+}} : $Zim, #Foo.init!initializer.1
46
46
}
47
47
48
48
class Zang : Foo {
@@ -55,7 +55,7 @@ class Zang: Foo {
55
55
// CHECK-LABEL: sil hidden @_TFC22super_init_refcounting4Zangc
56
56
// CHECK-NOT: strong_retain
57
57
// CHECK-NOT: strong_release
58
- // CHECK: function_ref @_TFC22super_init_refcounting3Fooc
58
+ // CHECK: super_method {{%[0-9]+}} : $Zang, #Foo.init!initializer.1
59
59
}
60
60
61
61
class Bad : Foo {
@@ -78,7 +78,7 @@ class Good: Foo {
78
78
// CHECK: assign {{.*}} to [[X_ADDR]] : $*Int
79
79
// CHECK: [[SELF_OBJ:%.*]] = load [[SELF]] : $*Good
80
80
// CHECK: [[SUPER_OBJ:%.*]] = upcast [[SELF_OBJ]] : $Good to $Foo
81
- // CHECK: [[SUPER_INIT:%.*]] = function_ref @_TFC22super_init_refcounting3Fooc
81
+ // CHECK: [[SUPER_INIT:%.*]] = super_method [[SELF_OBJ]] : $Good, #Foo.init!initializer.1
82
82
// CHECK: [[SELF_OBJ:%.*]] = load [[SELF]]
83
83
// CHECK: [[X_ADDR:%.*]] = ref_element_addr [[SELF_OBJ]] : $Good, #Good.x
84
84
// CHECK: [[X:%.*]] = load [[X_ADDR]] : $*Int
0 commit comments