File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11// RUN: %target-swift-frontend -emit-silgen %s -module-name test -swift-version 5 -disable-availability-checking | %FileCheck --enable-var-scope %s --implicit-check-not 'hop_to_executor {{%[0-9]+}}'
22// REQUIRES: concurrency
33
4+ // CHECK-LABEL: sil hidden [ossa] @$s4test16unspecifiedAsyncyyYaF : $@convention(thin) @async () -> ()
5+ // CHECK: bb0:
6+ // CHECK-NEXT: [[GENERIC:%[0-9]+]] = enum $Optional<Builtin.Executor>, #Optional.none!enumelt
7+ // CHECK-NEXT: hop_to_executor [[GENERIC]]
8+ // CHECK: } // end sil function '$s4test16unspecifiedAsyncyyYaF'
49func unspecifiedAsync( ) async { }
510
611actor MyActor {
@@ -104,7 +109,7 @@ actor MyActor {
104109 // ** third hop is right after calling an arbitrary async function
105110 // CHECK: [[FUNC:%[0-9]+]] = function_ref @$s4test16unspecifiedAsyncyyYaF : $@convention(thin) @async () -> ()
106111 // CHECK: = apply [[FUNC]]() : $@convention(thin) @async () -> ()
107- // CHECK-NEXT: hop_to_executor %9 : $MainActor
112+ // CHECK-NEXT: hop_to_executor {{%[0-9]+}} : $MainActor
108113 // CHECK: } // end sil function '$s4test7MyActorC10delegatingACSb_tYacfC'
109114 @MainActor
110115 convenience init ( delegating c: Bool ) async {
Original file line number Diff line number Diff line change @@ -302,7 +302,10 @@ actor Ahmad {
302302 var x : Int = 0
303303
304304 // CHECK-LABEL: sil hidden @$s4test5AhmadCACyYacfc : $@convention(method) @async (@owned Ahmad) -> @owned Ahmad {
305+ // CHECK: bb0{{.*}}:
306+ // CHECK-NEXT: [[GENERIC:%[0-9]+]] = enum $Optional<Builtin.Executor>, #Optional.none!enumelt
307+ // CHECK-NEXT: hop_to_executor [[GENERIC]]
305308 // CHECK: store {{%[0-9]+}} to {{%[0-9]+}} : $*Int
306309 // CHECK: } // end sil function '$s4test5AhmadCACyYacfc'
307- nonisolated init ( ) async { } // no hop should appear here because of explicit nonisolated marking.
310+ nonisolated init ( ) async { }
308311}
You can’t perform that action at this time.
0 commit comments