Skip to content

Commit 6e3e83c

Browse files
committed
Update test/SILGen/super_init_refcounting.swift for native super dispatch
NFC.
1 parent b55bdbd commit 6e3e83c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/SILGen/super_init_refcounting.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s
1+
// RUN: %target-swift-frontend -use-native-super-method -emit-silgen %s | FileCheck %s
22

33
class Foo {
44
init() {}
@@ -14,7 +14,7 @@ class Bar: Foo {
1414
// CHECK-NOT: strong_retain [[ORIG_SELF]]
1515
// CHECK: [[ORIG_SELF_UP:%.*]] = upcast [[ORIG_SELF]]
1616
// 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
1818
// CHECK: [[NEW_SELF:%.*]] = apply [[SUPER_INIT]]([[ORIG_SELF_UP]])
1919
// CHECK: [[NEW_SELF_DOWN:%.*]] = unchecked_ref_cast [[NEW_SELF]]
2020
// CHECK: store [[NEW_SELF_DOWN]] to [[SELF_MUI]]
@@ -42,7 +42,7 @@ class Zim: Foo {
4242
// CHECK-LABEL: sil hidden @_TFC22super_init_refcounting3Zimc
4343
// CHECK-NOT: strong_retain
4444
// CHECK-NOT: strong_release
45-
// CHECK: function_ref @_TFC22super_init_refcounting3Fooc
45+
// CHECK: super_method {{%[0-9]+}} : $Zim, #Foo.init!initializer.1
4646
}
4747

4848
class Zang: Foo {
@@ -55,7 +55,7 @@ class Zang: Foo {
5555
// CHECK-LABEL: sil hidden @_TFC22super_init_refcounting4Zangc
5656
// CHECK-NOT: strong_retain
5757
// CHECK-NOT: strong_release
58-
// CHECK: function_ref @_TFC22super_init_refcounting3Fooc
58+
// CHECK: super_method {{%[0-9]+}} : $Zang, #Foo.init!initializer.1
5959
}
6060

6161
class Bad: Foo {
@@ -78,7 +78,7 @@ class Good: Foo {
7878
// CHECK: assign {{.*}} to [[X_ADDR]] : $*Int
7979
// CHECK: [[SELF_OBJ:%.*]] = load [[SELF]] : $*Good
8080
// 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
8282
// CHECK: [[SELF_OBJ:%.*]] = load [[SELF]]
8383
// CHECK: [[X_ADDR:%.*]] = ref_element_addr [[SELF_OBJ]] : $Good, #Good.x
8484
// CHECK: [[X:%.*]] = load [[X_ADDR]] : $*Int

0 commit comments

Comments
 (0)