@@ -26,12 +26,26 @@ internal func internalFunc() {}
26
26
// CHECK-NO-SKIP: sil hidden{{.*}} @$s4Test022internalFuncWithNestedC0yyF : $@convention(thin) () -> () {
27
27
// CHECK-SKIP-NOT: s4Test022internalFuncWithNestedC0yyF
28
28
internal func internalFuncWithNestedFunc( ) {
29
+ defer { internalFunc ( ) }
29
30
func nested( ) { }
30
31
nested ( )
32
+ let _: ( ) -> ( ) = {
33
+ defer { internalFunc ( ) }
34
+ internalFunc ( )
35
+ } ( )
31
36
}
37
+ // CHECK-NO-SKIP: sil private{{.*}} @$s4Test022internalFuncWithNestedC0yyF6$deferL_yyF : $@convention(thin) () -> () {
38
+ // CHECK-SKIP-NOT: s4Test022internalFuncWithNestedC0yyF6$deferL_yyF
39
+
32
40
// CHECK-NO-SKIP: sil private{{.*}} @$s4Test022internalFuncWithNestedC0yyF6nestedL_yyF : $@convention(thin) () -> () {
33
41
// CHECK-SKIP-NOT: s4Test022internalFuncWithNestedC0yyF6nestedL_yyF
34
42
43
+ // CHECK-NO-SKIP: sil private{{.*}} @$s4Test022internalFuncWithNestedC0yyFyycyXEfU_ : $@convention(thin) () -> @owned @callee_guaranteed () -> () {
44
+ // CHECK-SKIP-NOT: s4Test022internalFuncWithNestedC0yyFyycyXEfU_
45
+
46
+ // CHECK-NO-SKIP: sil private{{.*}} @$s4Test022internalFuncWithNestedC0yyFyycyXEfU_6$deferL_yyF : $@convention(thin) () -> () {
47
+ // CHECK-SKIP-NOT: @$s4Test022internalFuncWithNestedC0yyFyycyXEfU_6$deferL_yyF
48
+
35
49
// CHECK: sil{{.*}} @$s4Test10publicFuncyyF : $@convention(thin) () -> () {
36
50
public func publicFunc( ) { }
37
51
@@ -66,9 +80,15 @@ public var publicGlobalVar = 1
66
80
defer { publicFunc ( ) }
67
81
func nested( ) { }
68
82
nested ( )
83
+ let _: ( ) -> ( ) = {
84
+ defer { publicFunc ( ) }
85
+ publicFunc ( )
86
+ } ( )
69
87
}
70
88
// CHECK: sil shared [serialized]{{.*}} @$s4Test023inlinableFuncWithNestedC0yyF6$deferL_yyF : $@convention(thin) () -> () {
71
89
// CHECK: sil shared [serialized]{{.*}} @$s4Test023inlinableFuncWithNestedC0yyF6nestedL_yyF : $@convention(thin) () -> () {
90
+ // CHECK: sil shared [serialized]{{.*}} @$s4Test023inlinableFuncWithNestedC0yyFyycyXEfU_ : $@convention(thin) () -> @owned @callee_guaranteed () -> () {
91
+ // CHECK: sil shared [serialized]{{.*}} @$s4Test023inlinableFuncWithNestedC0yyFyycyXEfU_6$deferL_yyF : $@convention(thin) () -> () {
72
92
73
93
private class PrivateClass {
74
94
// CHECK-NO-SKIP: sil private{{.*}} @$s4Test12PrivateClass33_CFB3F9DC47F5EF9E1D08B58758351A08LLCfd : $@convention(method) (@guaranteed PrivateClass) -> @owned Builtin.NativeObject {
0 commit comments