mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
`-disable-llvm-optzns -disable-swift-specific-llvm-optzns -disable-objc-interop` was wrong way to avoid llvm coroutine lowering.
18 lines
499 B
Plaintext
18 lines
499 B
Plaintext
// Ensure that IRGen don't emit unreachable after coro.end.async for targets that don't support musttail call.
|
|
// RUN: %swift -target wasm32-unknown-none -parse-stdlib %s -module-name main -emit-irgen -o - | %FileCheck %s
|
|
|
|
// REQUIRES: concurrency, CODEGENERATOR=WebAssembly
|
|
|
|
sil_stage canonical
|
|
|
|
import Builtin
|
|
|
|
sil @test_simple : $@async () -> () {
|
|
bb0:
|
|
%0 = tuple ()
|
|
return %0 : $()
|
|
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async
|
|
// CHECK-NOT: unreachable
|
|
// CHECK: ret void
|
|
}
|