@@ -25,6 +25,9 @@ func testSlowServer(slowServer: SlowServer) async throws {
25
25
// CHECK: [[BLOCK:%.*]] = init_block_storage_header [[BLOCK_STORAGE]] {{.*}}, invoke [[BLOCK_IMPL]]
26
26
// CHECK: apply [[METHOD]]([[ARG]], [[BLOCK]], %0)
27
27
// CHECK: [[COPY:%.*]] = copy_value [[ARG]]
28
+ // CHECK: destroy_addr [[CHECKED_CONT_SLOT]] : $*CheckedContinuation<Int, Never>
29
+ // CHECK: dealloc_stack [[CHECKED_CONT]] : $*CheckedContinuation<Int, Never>
30
+ // CHECK: dealloc_stack %20 : $*@block_storage Any
28
31
// CHECK: destroy_value [[ARG]]
29
32
// CHECK: await_async_continuation [[CONT]] {{.*}}, resume [[RESUME:bb[0-9]+]]
30
33
// CHECK: [[RESUME]]:
@@ -50,6 +53,8 @@ func testSlowServer(slowServer: SlowServer) async throws {
50
53
// CHECK: [[BLOCK_IMPL:%.*]] = function_ref @[[STRING_COMPLETION_THROW_BLOCK:.*]] : $@convention(c) (@inout_aliasable @block_storage Any, Optional<NSString>, Optional<NSError>) -> ()
51
54
// CHECK: [[BLOCK:%.*]] = init_block_storage_header [[BLOCK_STORAGE]] {{.*}}, invoke [[BLOCK_IMPL]]
52
55
// CHECK: apply [[METHOD]]([[BLOCK]], %0)
56
+ // CHECK: destroy_addr [[CHECKED_CONT_SLOT]] : $*CheckedContinuation<String, any Error>
57
+ // CHECK: dealloc_stack [[CHECKED_CONT]] : $*CheckedContinuation<String, any Error>
53
58
// CHECK: await_async_continuation [[CONT]] {{.*}}, resume [[RESUME:bb[0-9]+]], error [[ERROR:bb[0-9]+]]
54
59
// CHECK: [[RESUME]]:
55
60
// CHECK: [[RESULT:%.*]] = load [take] [[RESUME_BUF]]
@@ -207,6 +212,8 @@ func testSlowServerFromMain(slowServer: SlowServer) async throws {
207
212
// CHECK: [[BLOCK:%.*]] = init_block_storage_header [[BLOCK_STORAGE]] {{.*}}, invoke [[BLOCK_IMPL]]
208
213
// CHECK: apply [[METHOD]]([[ARG]], [[BLOCK]], %0)
209
214
// CHECK: [[COPY:%.*]] = copy_value [[ARG]]
215
+ // CHECK: destroy_addr [[CHECKED_CONT_SLOT]] : $*CheckedContinuation<Int, Never>
216
+ // CHECK: dealloc_stack [[CHECKED_CONT]] : $*CheckedContinuation<Int, Never>
210
217
// CHECK: destroy_value [[ARG]]
211
218
// CHECK: await_async_continuation [[CONT]] {{.*}}, resume [[RESUME:bb[0-9]+]]
212
219
// CHECK: [[RESUME]]:
@@ -232,6 +239,8 @@ func testSlowServerFromMain(slowServer: SlowServer) async throws {
232
239
// CHECK: [[CHECKED_CONT:%.*]] = alloc_stack $CheckedContinuation<String, any Error>
233
240
// CHECK: {{.*}} = apply [[CHECKED_CONT_INIT_FN]]<String>([[CHECKED_CONT]], [[UNSAFE_CONT]]) : $@convention(thin) <τ_0_0> (UnsafeContinuation<τ_0_0, any Error>) -> @out CheckedContinuation<τ_0_0, any Error>
234
241
// CHECK: copy_addr [take] [[CHECKED_CONT]] to [init] [[CHECKED_CONT_SLOT]] : $*CheckedContinuation<String, any Error>
242
+ // CHECK: destroy_addr [[CHECKED_CONT_SLOT]] : $*CheckedContinuation<String, any Error>
243
+ // CHECK: dealloc_stack [[CHECKED_CONT]] : $*CheckedContinuation<String, any Error>
235
244
// CHECK: cond_br {{.*}}, [[RESUME:bb[0-9]+]], [[ERROR:bb[0-9]+]]
236
245
//
237
246
// CHECK: [[ERROR]]:
@@ -268,6 +277,7 @@ func testThrowingMethodFromMain(slowServer: SlowServer) async -> String {
268
277
// CHECK: [[OPTIONAL_BLK:%.*]] = enum {{.*}}, #Optional.some!enumelt, [[BLOCK]]
269
278
// CHECK: {{.*}} = apply [[METH]]([[STRING_ARG]], [[OPTIONAL_BLK]], {{%.*}}) : $@convention(objc_method) (NSString, Optional<@convention(block) (Optional<NSString>, Optional<NSError>) -> ()>, SlowServer) -> ()
270
279
// CHECK: [[STRING_ARG_COPY:%.*]] = copy_value [[STRING_ARG]] : $NSString
280
+ // CHECK: destroy_addr [[CHECKED_CONT_SLOT]] : $*CheckedContinuation<String, any Error>
271
281
// CHECK: dealloc_stack [[CHECKED_CONT]] : $*CheckedContinuation<String, any Error>
272
282
// CHECK: dealloc_stack [[STORE_ALLOC]] : $*@block_storage Any
273
283
// CHECK: destroy_value [[STRING_ARG]] : $NSString
@@ -302,6 +312,8 @@ func testThrowingMethodFromMain(slowServer: SlowServer) async -> String {
302
312
// CHECK: [[METH:%.*]] = objc_method {{%.*}} : $@objc_metatype Person.Type, #Person.asCustomer!foreign
303
313
// CHECK: get_async_continuation_addr NSObject, [[RESULT_BUF]] : $*NSObject
304
314
// CHECK: = apply [[METH]]
315
+ // CHECK: destroy_addr {{.*}} : $*CheckedContinuation<NSObject, Never>
316
+ // CHECK: dealloc_stack {{.*}} : $*CheckedContinuation<NSObject, Never>
305
317
// CHECK: dealloc_stack {{%.*}} : $*@block_storage
306
318
// CHECK: await_async_continuation {{%.*}} : $Builtin.RawUnsafeContinuation, resume bb1
307
319
// CHECK: bb1:
@@ -349,6 +361,8 @@ extension OptionalMemberLookups {
349
361
// CHECK: = function_ref @$sIeyB_yt18objc_async_checked21OptionalMemberLookupsRzlTz_ : $@convention(c) @pseudogeneric <τ_0_0 where τ_0_0 : OptionalMemberLookups> (@inout_aliasable @block_storage Any) -> ()
350
362
// CHECK: [[BLOCK:%[0-9]+]] = init_block_storage_header {{.*}} : $*@block_storage Any
351
363
// CHECK: = apply [[METH]]([[BLOCK]], [[SELF]]) : $@convention(objc_method) (@convention(block) () -> (), Self) -> ()
364
+ // CHECK: destroy_addr [[CHECKED_CONT_SLOT]] : $*CheckedContinuation<(), Never>
365
+ // CHECK: dealloc_stack [[CHECKED_CONT]] : $*CheckedContinuation<(), Never>
352
366
// CHECK: await_async_continuation {{.*}} : $Builtin.RawUnsafeContinuation, resume bb1
353
367
// CHECK: hop_to_executor {{.*}} : $MainActor
354
368
// CHECK: } // end sil function '$s18objc_async_checked21OptionalMemberLookupsPAAE19testForceDirectCallyyYaF'
0 commit comments