5
5
6
6
import OtherActors
7
7
8
- // CHECK: sil hidden [ossa] @$s4test6check1ySi11OtherActors0C11ModuleActorCYaF : $@convention(thin) @async (@guaranteed OtherModuleActor) -> Int {
8
+ // CHECK-LABEL : sil hidden [ossa] @$s4test6check1ySi11OtherActors0C11ModuleActorCYaF : $@convention(thin) @async (@guaranteed OtherModuleActor) -> Int {
9
9
// CHECK: bb0([[SELF:%[0-9]+]] : @guaranteed $OtherModuleActor):
10
10
// CHECK: [[REF:%[0-9]+]] = ref_element_addr [[SELF]] : $OtherModuleActor, #OtherModuleActor.a
11
11
// CHECK: [[OLD:%[0-9]+]] = builtin "getCurrentExecutor"() : $Optional<Builtin.Executor>
@@ -25,14 +25,17 @@ func check3(_ actor: OtherModuleActor) async -> Int {
25
25
return actor . b
26
26
}
27
27
28
- // CHECK: sil hidden [ossa] @$s4test6check4y11OtherActors17SomeSendableClassCAC0C11ModuleActorCYaF : $@convention(thin) @async (@guaranteed OtherModuleActor) -> @owned SomeSendableClass {
29
- // CHECK: bb0([[SELF:%[0-9]+]] : @guaranteed $OtherModuleActor):
30
- // CHECK: [[REF:%[0-9]+]] = ref_element_addr [[SELF]] : $OtherModuleActor, #OtherModuleActor.d
28
+ // CHECK-LABEL: sil hidden [ossa] @$s4test6check4y11OtherActors17SomeSendableClassCSgAC0C11ModuleActorCSgYaF : $@convention(thin) @async (@guaranteed Optional<OtherModuleActor>) -> @owned Optional<SomeSendableClass> {
29
+ // CHECK: bb0({{%[0-9]+}} : @guaranteed $Optional<OtherModuleActor>):
30
+ // CHECK: switch_enum {{%[0-9]+}} : $Optional<OtherModuleActor>, case #Optional.some!enumelt: [[SOME:bb[0-9]+]], case #Optional.none!enumelt: {{bb[0-9]+}}
31
+
32
+ // CHECK: [[SOME]]({{%[0-9]+}} : @owned $OtherModuleActor):
33
+ // CHECK: [[REF:%[0-9]+]] = ref_element_addr {{%[0-9]+}} : $OtherModuleActor, #OtherModuleActor.d
31
34
// CHECK: [[OLD:%[0-9]+]] = builtin "getCurrentExecutor"() : $Optional<Builtin.Executor>
32
- // CHECK: hop_to_executor [[SELF]] : $OtherModuleActor
35
+ // CHECK: hop_to_executor {{%[0-9]+}} : $OtherModuleActor
33
36
// CHECK-NEXT: load [copy] [[REF]]
34
- // CHECK-NEXT: hop_to_executor [[OLD]] : $Optional<Builtin.Executor>
35
- // CHECK: } // end sil function '$s4test6check4y11OtherActors17SomeSendableClassCAC0C11ModuleActorCYaF '
36
- func check4( _ actor : OtherModuleActor ) async -> SomeSendableClass {
37
- return await actor . d
37
+ // CHECK: hop_to_executor [[OLD]] : $Optional<Builtin.Executor>
38
+ // CHECK: } // end sil function '$s4test6check4y11OtherActors17SomeSendableClassCSgAC0C11ModuleActorCSgYaF '
39
+ func check4( _ actor : OtherModuleActor ? ) async -> SomeSendableClass ? {
40
+ return await actor ? . d
38
41
}
0 commit comments