Skip to content

Commit fe83f98

Browse files
authored
Merge pull request #40522 from DougGregor/test-case-sr-14764
2 parents cd6755b + eee05ae commit fe83f98

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/SILGen/hop_to_executor.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@ struct GlobalActor {
9393
func testGlobalActor() async {
9494
}
9595

96+
// CHECK-LABEL: sil hidden [ossa] @$s4test0A17GlobalActorUnsafeyyYaF : $@convention(thin) @async () -> () {
97+
// CHECK: [[F:%[0-9]+]] = function_ref @$s4test11GlobalActorV6sharedAA02MyC0Cvau : $@convention(thin) () -> Builtin.RawPointer
98+
// CHECK: [[P:%[0-9]+]] = apply [[F]]() : $@convention(thin) () -> Builtin.RawPointer
99+
// CHECK: [[A:%[0-9]+]] = pointer_to_address %2 : $Builtin.RawPointer to [strict] $*MyActor
100+
// CHECK: [[ACC:%[0-9]+]] = begin_access [read] [dynamic] [[A]] : $*MyActor
101+
// CHECK: [[L:%[0-9]+]] = load [copy] [[ACC]] : $*MyActor
102+
// CHECK: [[B:%[0-9]+]] = begin_borrow [[L]] : $MyActor
103+
// CHECK: hop_to_executor [[B]] : $MyActor
104+
// CHECK: }
105+
@GlobalActor
106+
@_predatesConcurrency
107+
func testGlobalActorUnsafe() async {
108+
}
109+
96110
///// testGlobalActorWithClosure()
97111
// CHECK: sil hidden [ossa] @$s4test0A22GlobalActorWithClosureyyYaF : $@convention(thin) @async () -> () {
98112
// CHECK: hop_to_executor [[A:%[0-9]+]] : $MyActor

0 commit comments

Comments
 (0)