mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If LLVM optimizations are to be disabled, we cannot just not run all LLVM passes, because there are some mandatory LLVM passes, like coro splitting. Instead, just run the -O0 LLVM pipeline if -disable-llvm-optzns is used. Fixes compiler crashes if -disable-llvm-optzns is used. Note: if one wants to see the output of IRGen, -emit-irgen can be used.
15 lines
364 B
Swift
15 lines
364 B
Swift
// RUN: %target-swift-frontend -primary-file %s -g -emit-irgen -disable-availability-checking | %FileCheck %s
|
|
// REQUIRES: concurrency
|
|
|
|
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async
|
|
func foo() async -> Never {
|
|
await bar()
|
|
fatalError()
|
|
}
|
|
|
|
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async
|
|
func bar() async -> Never {
|
|
await foo()
|
|
fatalError()
|
|
}
|