@@ -26,12 +26,26 @@ internal func internalFunc() {}
2626// CHECK-NO-SKIP: sil hidden{{.*}} @$s4Test022internalFuncWithNestedC0yyF : $@convention(thin) () -> () {
2727// CHECK-SKIP-NOT: s4Test022internalFuncWithNestedC0yyF
2828internal func internalFuncWithNestedFunc( ) {
29+ defer { internalFunc ( ) }
2930 func nested( ) { }
3031 nested ( )
32+ let _: ( ) -> ( ) = {
33+ defer { internalFunc ( ) }
34+ internalFunc ( )
35+ } ( )
3136}
37+ // CHECK-NO-SKIP: sil private{{.*}} @$s4Test022internalFuncWithNestedC0yyF6$deferL_yyF : $@convention(thin) () -> () {
38+ // CHECK-SKIP-NOT: s4Test022internalFuncWithNestedC0yyF6$deferL_yyF
39+
3240// CHECK-NO-SKIP: sil private{{.*}} @$s4Test022internalFuncWithNestedC0yyF6nestedL_yyF : $@convention(thin) () -> () {
3341// CHECK-SKIP-NOT: s4Test022internalFuncWithNestedC0yyF6nestedL_yyF
3442
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+
3549// CHECK: sil{{.*}} @$s4Test10publicFuncyyF : $@convention(thin) () -> () {
3650public func publicFunc( ) { }
3751
@@ -66,9 +80,15 @@ public var publicGlobalVar = 1
6680 defer { publicFunc ( ) }
6781 func nested( ) { }
6882 nested ( )
83+ let _: ( ) -> ( ) = {
84+ defer { publicFunc ( ) }
85+ publicFunc ( )
86+ } ( )
6987}
7088// CHECK: sil shared [serialized]{{.*}} @$s4Test023inlinableFuncWithNestedC0yyF6$deferL_yyF : $@convention(thin) () -> () {
7189// 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) () -> () {
7292
7393private class PrivateClass {
7494 // CHECK-NO-SKIP: sil private{{.*}} @$s4Test12PrivateClass33_CFB3F9DC47F5EF9E1D08B58758351A08LLCfd : $@convention(method) (@guaranteed PrivateClass) -> @owned Builtin.NativeObject {
0 commit comments