@@ -428,21 +428,31 @@ func conversionsFromSyncToAsync(_ x: @escaping @Sendable (NonSendableKlass) -> V
428
428
429
429
func testThatClosuresAssumeIsolation( fn: inout nonisolated( nonsending ) ( Int ) async -> Void ) {
430
430
// CHECK-LABEL: sil private [ossa] @$s21attr_execution_silgen31testThatClosuresAssumeIsolation2fnyySiYaYCcz_tFyyYaYCcfU_ : $@convention(thin) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>) -> ()
431
+ // CHECK: bb0([[EXECUTOR:%.*]] : @guaranteed $Optional<any Actor>):
432
+ // CHECK: hop_to_executor [[EXECUTOR]]
431
433
let _: nonisolated( nonsending ) ( ) async -> Void = {
432
434
42
433
435
}
434
436
435
437
func testParam( _: nonisolated( nonsending ) ( ) async throws -> Void ) { }
436
438
437
439
// CHECK-LABEL: sil private [ossa] @$s21attr_execution_silgen31testThatClosuresAssumeIsolation2fnyySiYaYCcz_tFyyYaYCXEfU0_ : $@convention(thin) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>) -> @error any Error
440
+ // CHECK: bb0([[EXECUTOR:%.*]] : @guaranteed $Optional<any Actor>):
441
+ // CHECK: hop_to_executor [[EXECUTOR]]
438
442
testParam { 42 }
439
443
440
444
// CHECK-LABEL: sil private [ossa] @$s21attr_execution_silgen31testThatClosuresAssumeIsolation2fnyySiYaYCcz_tFyyYaXEfU1_ : $@convention(thin) @async () -> ()
445
+ // CHECK: [[GENERIC_EXECUTOR:%.*]] = enum $Optional<Builtin.Executor>, #Optional.none!enumelt
446
+ // CHECK: hop_to_executor [[GENERIC_EXECUTOR]]
441
447
testParam { @concurrent in 42 }
442
448
443
449
// CHECK-LABEL: sil private [ossa] @$s21attr_execution_silgen31testThatClosuresAssumeIsolation2fnyySiYaYCcz_tFySiYaYCcfU2_ : $@convention(thin) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>, Int) -> ()
450
+ // CHECK: bb0([[EXECUTOR:%.*]] : @guaranteed $Optional<any Actor>, %1 : $Int):
451
+ // CHECK: hop_to_executor [[EXECUTOR]]
444
452
fn = { _ in }
445
453
446
454
// CHECK-LABEL: sil private [ossa] @$s21attr_execution_silgen31testThatClosuresAssumeIsolation2fnyySiYaYCcz_tFySiYacfU3_ : $@convention(thin) @async (Int) -> ()
455
+ // CHECK: [[GENERIC_EXECUTOR:%.*]] = enum $Optional<Builtin.Executor>, #Optional.none!enumelt
456
+ // CHECK: hop_to_executor [[GENERIC_EXECUTOR]]
447
457
fn = { @concurrent _ in }
448
458
}
0 commit comments