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 1
1
// 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]+}}'
2
2
// REQUIRES: concurrency
3
3
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'
4
9
func unspecifiedAsync( ) async { }
5
10
6
11
actor MyActor {
@@ -104,7 +109,7 @@ actor MyActor {
104
109
// ** third hop is right after calling an arbitrary async function
105
110
// CHECK: [[FUNC:%[0-9]+]] = function_ref @$s4test16unspecifiedAsyncyyYaF : $@convention(thin) @async () -> ()
106
111
// CHECK: = apply [[FUNC]]() : $@convention(thin) @async () -> ()
107
- // CHECK-NEXT: hop_to_executor %9 : $MainActor
112
+ // CHECK-NEXT: hop_to_executor {{%[0-9]+}} : $MainActor
108
113
// CHECK: } // end sil function '$s4test7MyActorC10delegatingACSb_tYacfC'
109
114
@MainActor
110
115
convenience init ( delegating c: Bool ) async {
Original file line number Diff line number Diff line change @@ -302,7 +302,10 @@ actor Ahmad {
302
302
var x : Int = 0
303
303
304
304
// 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]]
305
308
// CHECK: store {{%[0-9]+}} to {{%[0-9]+}} : $*Int
306
309
// CHECK: } // end sil function '$s4test5AhmadCACyYacfc'
307
- nonisolated init ( ) async { } // no hop should appear here because of explicit nonisolated marking.
310
+ nonisolated init ( ) async { }
308
311
}
You can’t perform that action at this time.
0 commit comments