Skip to content

Commit 67d7f95

Browse files
committed
test updates after rebasing on main
these updates primarily are to account for the new generic executor that is being used for nonisolated / unspecified async functions.
1 parent f3c6519 commit 67d7f95

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

test/SILGen/hop_to_executor.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
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'
49
func unspecifiedAsync() async {}
510

611
actor 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 {

test/SILOptimizer/definite_init_actor.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)