File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -3162,6 +3162,10 @@ void IRGenSILFunction::visitStringLiteralInst(swift::StringLiteralInst *i) {
3162
3162
}
3163
3163
3164
3164
void IRGenSILFunction::visitUnreachableInst (swift::UnreachableInst *i) {
3165
+ if (isAsync ()) {
3166
+ emitCoroutineOrAsyncExit ();
3167
+ return ;
3168
+ }
3165
3169
Builder.CreateUnreachable ();
3166
3170
}
3167
3171
Original file line number Diff line number Diff line change 2
2
3
3
// REQUIRES: executable_test
4
4
// REQUIRES: concurrency
5
- // REQUIRES: rdar73262638
6
5
7
6
// REQUIRES: OS=macosx || OS=ios
8
7
// FIXME: should not require Darwin to run this test once we have async main!
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-experimental-concurrency -disable-llvm-optzns -disable-swift-specific-llvm-optzns | %FileCheck %s
2
+ // REQUIRES: concurrency
3
+
4
+ // CHECK: call i1 @llvm.coro.end
5
+ func foo( ) async -> Never {
6
+ await bar ( )
7
+ fatalError ( )
8
+ }
9
+
10
+ // CHECK: call i1 @llvm.coro.end
11
+ func bar( ) async -> Never {
12
+ await foo ( )
13
+ fatalError ( )
14
+ }
You can’t perform that action at this time.
0 commit comments