Skip to content

Commit df3d028

Browse files
committed
Update test/SILGen/closures.swift for native super dispatch
NFC.
1 parent 178ad5c commit df3d028

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

test/SILGen/closures.swift

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

33
import Swift
44

@@ -352,7 +352,7 @@ class SuperSub : SuperBase {
352352
// CHECK: [[CLASS_METHOD:%.*]] = class_method %0 : $SuperSub, #SuperSub.boom!1
353353
// CHECK: = apply [[CLASS_METHOD]](%0)
354354
// CHECK: [[SUPER:%.*]] = upcast %0 : $SuperSub to $SuperBase
355-
// CHECK: [[SUPER_METHOD:%.*]] = function_ref @_TFC8closures9SuperBase4boom
355+
// CHECK: [[SUPER_METHOD:%[0-9]+]] = super_method %0 : $SuperSub, #SuperBase.boom!1
356356
// CHECK: = apply [[SUPER_METHOD]]([[SUPER]])
357357
// CHECK: return
358358
func a1() {
@@ -376,8 +376,8 @@ class SuperSub : SuperBase {
376376
// CHECK: [[CLASS_METHOD:%.*]] = class_method %0 : $SuperSub, #SuperSub.boom!1
377377
// CHECK: = apply [[CLASS_METHOD]](%0)
378378
// CHECK: [[SUPER:%.*]] = upcast %0 : $SuperSub to $SuperBase
379-
// CHECK: [[METHOD:%.*]] = function_ref @_TFC8closures9SuperBase4boom
380-
// CHECK: = apply [[METHOD]]([[SUPER]])
379+
// CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $SuperSub, #SuperBase.boom!1
380+
// CHECK: = apply [[SUPER_METHOD]]([[SUPER]])
381381
// CHECK: return
382382
func b2() {
383383
self.boom()
@@ -397,8 +397,8 @@ class SuperSub : SuperBase {
397397
// CHECK: [[CLASS_METHOD:%.*]] = class_method %0 : $SuperSub, #SuperSub.boom!1
398398
// CHECK: = apply [[CLASS_METHOD]](%0)
399399
// CHECK: [[SUPER:%.*]] = upcast %0 : $SuperSub to $SuperBase
400-
// CHECK: [[METHOD:%.*]] = function_ref @_TFC8closures9SuperBase4boom
401-
// CHECK: = apply [[METHOD]]([[SUPER]])
400+
// CHECK: [[SUPER_METHOD:%[0-9]+]] = super_method %0 : $SuperSub, #SuperBase.boom!1
401+
// CHECK: = apply [[SUPER_METHOD]]([[SUPER]])
402402
// CHECK: return
403403
let c1 = { () -> Void in
404404
self.boom()
@@ -419,8 +419,8 @@ class SuperSub : SuperBase {
419419
let d1 = { () -> Void in
420420
// CHECK-LABEL: sil shared @_TFFFC8closures8SuperSub1d
421421
// CHECK: [[SUPER:%.*]] = upcast %0 : $SuperSub to $SuperBase
422-
// CHECK: [[METHOD:%.*]] = function_ref @_TFC8closures9SuperBase4boom
423-
// CHECK: = apply [[METHOD]]([[SUPER]])
422+
// CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $SuperSub, #SuperBase.boom!1
423+
// CHECK: = apply [[SUPER_METHOD]]([[SUPER]])
424424
// CHECK: return
425425
func d2() {
426426
super.boom()
@@ -442,8 +442,8 @@ class SuperSub : SuperBase {
442442
func e1() {
443443
// CHECK-LABEL: sil shared @_TFFFC8closures8SuperSub1e
444444
// CHECK: [[SUPER:%.*]] = upcast %0 : $SuperSub to $SuperBase
445-
// CHECK: [[METHOD:%.*]] = function_ref @_TFC8closures9SuperBase4boom
446-
// CHECK: = apply [[METHOD]]([[SUPER]])
445+
// CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $SuperSub, #SuperBase.boom!1
446+
// CHECK: = apply [[SUPER_METHOD]]([[SUPER]])
447447
// CHECK: return
448448
let e2 = {
449449
super.boom()
@@ -465,8 +465,8 @@ class SuperSub : SuperBase {
465465
let f1 = {
466466
// CHECK-LABEL: sil shared [transparent] @_TFFFC8closures8SuperSub1f
467467
// CHECK: [[SUPER:%.*]] = upcast %0 : $SuperSub to $SuperBase
468-
// CHECK: [[METHOD:%.*]] = function_ref @_TFC8closures9SuperBase4boom
469-
// CHECK: = apply [[METHOD]]([[SUPER]])
468+
// CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $SuperSub, #SuperBase.boom!1
469+
// CHECK: = apply [[SUPER_METHOD]]([[SUPER]])
470470
// CHECK: return
471471
nil ?? super.boom()
472472
}
@@ -484,8 +484,8 @@ class SuperSub : SuperBase {
484484
func g1() {
485485
// CHECK-LABEL: sil shared [transparent] @_TFFFC8closures8SuperSub1g
486486
// CHECK: [[SUPER:%.*]] = upcast %0 : $SuperSub to $SuperBase
487-
// CHECK: [[METHOD:%.*]] = function_ref @_TFC8closures9SuperBase4boom
488-
// CHECK: = apply [[METHOD]]([[SUPER]])
487+
// CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $SuperSub, #SuperBase.boom!1
488+
// CHECK: = apply [[SUPER_METHOD]]([[SUPER]])
489489
// CHECK: return
490490
nil ?? super.boom()
491491
}

0 commit comments

Comments
 (0)