@@ -1022,6 +1022,9 @@ sil [ossa] @closure6 : $@convention(thin) (@guaranteed Y, @guaranteed Y) -> @own
1022
1022
[%1: escape c*.v** => %r.c*.v**]
1023
1023
}
1024
1024
1025
+ sil @take_noescape_closure : $@convention(thin) (@guaranteed @noescape @callee_guaranteed (@guaranteed Y) -> ()) -> ()
1026
+ sil @take_escaping_closure : $@convention(thin) (@owned @callee_guaranteed (@guaranteed Y) -> ()) -> ()
1027
+
1025
1028
// CHECK-LABEL: Escape information for callClosure1:
1026
1029
// CHECK: - : %0 = alloc_ref $Y
1027
1030
// CHECK: global: %1 = alloc_ref $Y
@@ -1332,8 +1335,8 @@ sil @test_debug_value : $@convention(thin) () -> () {
1332
1335
}
1333
1336
1334
1337
// CHECK-LABEL: Escape information for test_walk_up_partial_apply_argument:
1335
- // CHECK: global: %0 = alloc_ref $Y // users: %3, %2
1336
- // CHECK: global: %6 = alloc_ref $X // user: %7
1338
+ // CHECK: global: %0 = alloc_ref $Y
1339
+ // CHECK: global: %6 = alloc_ref $X
1337
1340
// CHECK: End function test_walk_up_partial_apply_argument
1338
1341
sil @test_walk_up_partial_apply_argument : $@convention(thin) () -> () {
1339
1342
bb0:
@@ -1350,6 +1353,36 @@ bb0:
1350
1353
return %13 : $()
1351
1354
}
1352
1355
1356
+ // CHECK-LABEL: Escape information for test_escaping_closure:
1357
+ // CHECK: global: %0 = alloc_ref $Y
1358
+ // CHECK: End function test_escaping_closure
1359
+ sil @test_escaping_closure : $@convention(thin) () -> () {
1360
+ bb0:
1361
+ %0 = alloc_ref $Y
1362
+ %1 = function_ref @closure1 : $@convention(thin) (@guaranteed Y, @guaranteed Y) -> ()
1363
+ %2 = partial_apply [callee_guaranteed] %1(%0) : $@convention(thin) (@guaranteed Y, @guaranteed Y) -> ()
1364
+ %3 = function_ref @take_escaping_closure : $@convention(thin) (@owned @callee_guaranteed (@guaranteed Y) -> ()) -> ()
1365
+ %5 = apply %3(%2) : $@convention(thin) (@owned @callee_guaranteed (@guaranteed Y) -> ()) -> ()
1366
+ %13 = tuple ()
1367
+ return %13 : $()
1368
+ }
1369
+
1370
+ // CHECK-LABEL: Escape information for test_noescape_partial_apply_and_convert_function:
1371
+ // CHECK: - : %0 = alloc_ref $Y
1372
+ // CHECK: End function test_noescape_partial_apply_and_convert_function
1373
+ sil @test_noescape_partial_apply_and_convert_function : $@convention(thin) () -> () {
1374
+ bb0:
1375
+ %0 = alloc_ref $Y
1376
+ %1 = function_ref @closure1 : $@convention(thin) (@guaranteed Y, @guaranteed Y) -> ()
1377
+ %2 = partial_apply [callee_guaranteed] [on_stack] %1(%0) : $@convention(thin) (@guaranteed Y, @guaranteed Y) -> ()
1378
+ %3 = convert_function %2 : $@noescape @callee_guaranteed (@guaranteed Y) -> () to $@noescape @callee_guaranteed (@guaranteed Y) -> ()
1379
+ %4 = function_ref @take_noescape_closure : $@convention(thin) (@guaranteed @noescape @callee_guaranteed (@guaranteed Y) -> ()) -> ()
1380
+ %5 = apply %4(%3) : $@convention(thin) (@guaranteed @noescape @callee_guaranteed (@guaranteed Y) -> ()) -> ()
1381
+ dealloc_stack %2 : $@noescape @callee_guaranteed (@guaranteed Y) -> ()
1382
+ %13 = tuple ()
1383
+ return %13 : $()
1384
+ }
1385
+
1353
1386
// CHECK-LABEL: Escape information for test_mismatching_existential_types:
1354
1387
// CHECK: - : %1 = alloc_ref $Y
1355
1388
// CHECK: End function test_mismatching_existential_types
0 commit comments