mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This patch adds "_multithreaded" as a valid `_runtime` argument and sets it when the target is `wasm32-unknown-wasi-threads` or other non-none OS targets.
15 lines
543 B
Swift
15 lines
543 B
Swift
// RUN: %swift -typecheck %s -verify -target wasm32-unknown-wasi -disable-objc-interop -parse-stdlib
|
|
// RUN: %swift-ide-test -test-input-complete -source-filename %s -target wasm32-unknown-wasi
|
|
|
|
#if arch(wasm32) && os(WASI) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_32)
|
|
#if _hasAtomicBitWidth(_8) && _hasAtomicBitWidth(_16) && _hasAtomicBitWidth(_32) && _hasAtomicBitWidth(_64)
|
|
class C {}
|
|
var x = C()
|
|
#endif
|
|
#endif
|
|
var y = x
|
|
|
|
#if !_runtime(_multithreaded)
|
|
let z = xx // expected-error {{cannot find 'xx' in scope}}
|
|
#endif
|