mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Note that this /still/ isn't correct when there /isn't/ an explicit target, because LangOptions doesn't set up platform conditions when no target is explicitly set. But it's a step forward.
17 lines
482 B
Swift
17 lines
482 B
Swift
// RUN: %target-swift-ide-test -source-filename %s -annotate 2>&1 >/dev/null | %FileCheck %s -check-prefix=CHECK-%target-runtime
|
|
|
|
#if _runtime(_ObjC)
|
|
foo
|
|
// CHECK-objc: unresolved identifier 'foo'
|
|
// CHECK-objc-NOT: unresolved identifier 'bar'
|
|
// CHECK-objc-NOT: unresolved identifier 'baz'
|
|
|
|
#elseif _runtime(_Native)
|
|
bar
|
|
// CHECK-native-NOT: unresolved identifier 'foo'
|
|
// CHECK-native: unresolved identifier 'bar'
|
|
// CHECK-native-NOT: unresolved identifier 'baz'
|
|
|
|
#else
|
|
baz
|
|
#endif |