From ddd547943519bb39fb90d4ff43d2845f4f274d61 Mon Sep 17 00:00:00 2001 From: Dario Rexin Date: Fri, 25 Feb 2022 10:03:10 -0800 Subject: [PATCH] Fixes after rebasing --- lib/Basic/LangOptions.cpp | 25 +++++++------------ lib/Parse/ParseIfConfig.cpp | 11 +++++++- .../aarch64AndroidTarget.swift | 2 +- .../arm64AppleTVOSTarget.swift | 2 +- .../arm64IOSTarget.swift | 2 +- .../armAndroidTarget.swift | 2 +- .../ConditionalCompilation/armIOSTarget.swift | 2 +- .../armWatchOSTarget.swift | 2 +- .../i386AppleTVOSTarget.swift | 2 +- .../i386IOSTarget.swift | 2 +- .../i386WatchOSTarget.swift | 2 +- .../identifierName.swift | 16 ++++++------ .../powerpc64LinuxTarget.swift | 2 +- .../powerpc64leLinuxTarget.swift | 2 +- .../s390xLinuxTarget.swift | 2 +- .../ConditionalCompilation/wasm32Target.swift | 2 +- .../x64AppleTVOSTarget.swift | 2 +- .../x64CygwinTarget.swift | 2 +- .../x64FreeBSDTarget.swift | 2 +- .../ConditionalCompilation/x64IOSTarget.swift | 2 +- .../x64LinuxTarget.swift | 2 +- .../ConditionalCompilation/x64OSXTarget.swift | 4 +-- .../x64WindowsTarget.swift | 2 +- .../x86_64PS4Target.swift | 2 +- 24 files changed, 49 insertions(+), 47 deletions(-) diff --git a/lib/Basic/LangOptions.cpp b/lib/Basic/LangOptions.cpp index c527b409fccff..fc97dab009633 100644 --- a/lib/Basic/LangOptions.cpp +++ b/lib/Basic/LangOptions.cpp @@ -75,12 +75,12 @@ static const SupportedConditionalValue SupportedConditionalCompilationEndianness "big" }; -static const StringRef SupportedConditionalCompilationPointerBitWidths[] = { +static const SupportedConditionalValue SupportedConditionalCompilationPointerBitWidths[] = { "_32", "_64" }; -static const StringRef SupportedConditionalCompilationRuntimes[] = { +static const SupportedConditionalValue SupportedConditionalCompilationRuntimes[] = { "_ObjC", "_Native", }; @@ -110,6 +110,8 @@ ArrayRef getSupportedConditionalCompilationValues(con return SupportedConditionalCompilationArches; case PlatformConditionKind::Endianness: return SupportedConditionalCompilationEndianness; + case PlatformConditionKind::PointerBitWidth: + return SupportedConditionalCompilationPointerBitWidths; case PlatformConditionKind::Runtime: return SupportedConditionalCompilationRuntimes; case PlatformConditionKind::CanImport: @@ -391,32 +393,23 @@ std::pair LangOptions::setTarget(llvm::Triple triple) { break; } - // Set the "_native_word_size" platform condition. + // Set the "_pointerBitWidth" platform condition. switch (Target.getArch()) { + default: llvm_unreachable("undefined architecture pointer bit width"); case llvm::Triple::ArchType::arm: case llvm::Triple::ArchType::thumb: + case llvm::Triple::ArchType::aarch64_32: + case llvm::Triple::ArchType::x86: + case llvm::Triple::ArchType::wasm32: addPlatformConditionValue(PlatformConditionKind::PointerBitWidth, "_32"); break; case llvm::Triple::ArchType::aarch64: - addPlatformConditionValue(PlatformConditionKind::PointerBitWidth, "_64"); - break; case llvm::Triple::ArchType::ppc64: - addPlatformConditionValue(PlatformConditionKind::PointerBitWidth, "_64"); - break; case llvm::Triple::ArchType::ppc64le: - addPlatformConditionValue(PlatformConditionKind::PointerBitWidth, "_64"); - break; - case llvm::Triple::ArchType::x86: - addPlatformConditionValue(PlatformConditionKind::PointerBitWidth, "_32"); - break; case llvm::Triple::ArchType::x86_64: - addPlatformConditionValue(PlatformConditionKind::PointerBitWidth, "_64"); - break; case llvm::Triple::ArchType::systemz: addPlatformConditionValue(PlatformConditionKind::PointerBitWidth, "_64"); break; - default: - llvm_unreachable("undefined architecture pointer bit width"); } // Set the "runtime" platform condition. diff --git a/lib/Parse/ParseIfConfig.cpp b/lib/Parse/ParseIfConfig.cpp index 5d53bb8223a21..28c4b21233e4b 100644 --- a/lib/Parse/ParseIfConfig.cpp +++ b/lib/Parse/ParseIfConfig.cpp @@ -327,7 +327,16 @@ class ValidateIfConfigCondition : return E; } - // ( 'os' | 'arch' | '_endian' | '_pointer_bit_width' | '_runtime' | 'canImport') '(' identifier ')'' + if (*KindName == "canImport") { + if (!isModulePath(Arg)) { + D.diagnose(E->getLoc(), diag::unsupported_platform_condition_argument, + "module name"); + return nullptr; + } + return E; + } + + // ( 'os' | 'arch' | '_endian' | '_pointerBitWidth' | '_runtime') '(' identifier ')'' if (*KindName == "hasFeature") { if (!getDeclRefStr(Arg, DeclRefKind::Ordinary)) { D.diagnose(E->getLoc(), diag::unsupported_platform_condition_argument, diff --git a/test/Parse/ConditionalCompilation/aarch64AndroidTarget.swift b/test/Parse/ConditionalCompilation/aarch64AndroidTarget.swift index 613c3c1012e92..f119ffd3df060 100644 --- a/test/Parse/ConditionalCompilation/aarch64AndroidTarget.swift +++ b/test/Parse/ConditionalCompilation/aarch64AndroidTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(arm64) && os(Android) && _runtime(_Native) && _endian(little) +#if arch(arm64) && os(Android) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/arm64AppleTVOSTarget.swift b/test/Parse/ConditionalCompilation/arm64AppleTVOSTarget.swift index af7f4ed07dc4c..a9a614b86063c 100644 --- a/test/Parse/ConditionalCompilation/arm64AppleTVOSTarget.swift +++ b/test/Parse/ConditionalCompilation/arm64AppleTVOSTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(arm64) && os(tvOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_64) +#if arch(arm64) && os(tvOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/arm64IOSTarget.swift b/test/Parse/ConditionalCompilation/arm64IOSTarget.swift index a1a18847f3a0f..f1a8febd5fdfe 100644 --- a/test/Parse/ConditionalCompilation/arm64IOSTarget.swift +++ b/test/Parse/ConditionalCompilation/arm64IOSTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(arm64) && os(iOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_64) +#if arch(arm64) && os(iOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/armAndroidTarget.swift b/test/Parse/ConditionalCompilation/armAndroidTarget.swift index d8a0aa789b609..835e2856fdf35 100644 --- a/test/Parse/ConditionalCompilation/armAndroidTarget.swift +++ b/test/Parse/ConditionalCompilation/armAndroidTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(arm) && os(Android) && _runtime(_Native) && _endian(little) && _pointer_bit_width(_32) +#if arch(arm) && os(Android) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_32) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/armIOSTarget.swift b/test/Parse/ConditionalCompilation/armIOSTarget.swift index fc7297f698f8f..6d515b4edb3b6 100644 --- a/test/Parse/ConditionalCompilation/armIOSTarget.swift +++ b/test/Parse/ConditionalCompilation/armIOSTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(arm) && os(iOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_32) +#if arch(arm) && os(iOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_32) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/armWatchOSTarget.swift b/test/Parse/ConditionalCompilation/armWatchOSTarget.swift index 3698b839e9989..56e51ff687e2f 100644 --- a/test/Parse/ConditionalCompilation/armWatchOSTarget.swift +++ b/test/Parse/ConditionalCompilation/armWatchOSTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(arm) && os(watchOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_32) +#if arch(arm) && os(watchOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_32) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/i386AppleTVOSTarget.swift b/test/Parse/ConditionalCompilation/i386AppleTVOSTarget.swift index cc58bcc8329c6..2e1d1f1bd8873 100644 --- a/test/Parse/ConditionalCompilation/i386AppleTVOSTarget.swift +++ b/test/Parse/ConditionalCompilation/i386AppleTVOSTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(i386) && os(tvOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_32) +#if arch(i386) && os(tvOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_32) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/i386IOSTarget.swift b/test/Parse/ConditionalCompilation/i386IOSTarget.swift index a1e4917a2abda..072288714df6a 100644 --- a/test/Parse/ConditionalCompilation/i386IOSTarget.swift +++ b/test/Parse/ConditionalCompilation/i386IOSTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(i386) && os(iOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_32) +#if arch(i386) && os(iOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_32) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/i386WatchOSTarget.swift b/test/Parse/ConditionalCompilation/i386WatchOSTarget.swift index 715c79d0ad3b8..e7e1c5d4b87b1 100644 --- a/test/Parse/ConditionalCompilation/i386WatchOSTarget.swift +++ b/test/Parse/ConditionalCompilation/i386WatchOSTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(i386) && os(watchOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_32) +#if arch(i386) && os(watchOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_32) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/identifierName.swift b/test/Parse/ConditionalCompilation/identifierName.swift index 937a10fcb7a79..2335b313ce798 100644 --- a/test/Parse/ConditionalCompilation/identifierName.swift +++ b/test/Parse/ConditionalCompilation/identifierName.swift @@ -5,7 +5,7 @@ func f2( FOO: Int, swift: Int, _compiler_version: Int, - os: Int, arch: Int, _endian: Int, _pointer_bit_width: Int, _runtime: Int, + os: Int, arch: Int, _endian: Int, _pointerBitWidth: Int, _runtime: Int, targetEnvironment: Int, arm: Int, i386: Int, macOS: Int, OSX: Int, Linux: Int, big: Int, little: Int, @@ -22,8 +22,8 @@ func f2( _ = arch + i386 + arm #elseif _endian(big) && _endian(little) _ = _endian + big + little -#elseif _pointer_bit_width(_32) && _pointer_bit_width(_64) - _ = _pointer_bit_width + _32 + _64 +#elseif _pointerBitWidth(_32) && _pointerBitWidth(_64) + _ = _pointerBitWidth + _32 + _64 #elseif _runtime(_ObjC) && _runtime(_Native) _ = _runtime + _ObjC + _Native #elseif targetEnvironment(simulator) @@ -37,7 +37,7 @@ func f2( func f2() { let FOO = 1, swift = 1, _compiler_version = 1, - os = 1, arch = 1, _endian = 1, _pointer_bit_width = 1, _runtime = 1, + os = 1, arch = 1, _endian = 1, _pointerBitWidth = 1, _runtime = 1, targetEnvironment = 1, arm = 1, i386 = 1, macOS = 1, OSX = 1, Linux = 1, big = 1, little = 1, @@ -53,8 +53,8 @@ func f2() { _ = arch + i386 + arm #elseif _endian(big) && _endian(little) _ = _endian + big + little -#elseif _pointer_bit_width(_32) && _pointer_bit_width(_64) - _ = _pointer_bit_width + _32 + _64 +#elseif _pointerBitWidth(_32) && _pointerBitWidth(_64) + _ = _pointerBitWidth + _32 + _64 #elseif _runtime(_ObjC) && _runtime(_Native) _ = _runtime + _ObjC + _Native #elseif targetEnvironment(simulator) @@ -68,7 +68,7 @@ func f2() { struct S { let FOO = 1, swift = 1, _compiler_version = 1, - os = 1, arch = 1, _endian = 1, _pointer_bit_width = 1, _runtime = 1, + os = 1, arch = 1, _endian = 1, _pointerBitWidth = 1, _runtime = 1, targetEnvironment = 1, arm = 1, i386 = 1, macOS = 1, OSX = 1, Linux = 1, big = 1, little = 1, @@ -80,7 +80,7 @@ struct S { #elseif os(macOS) && os(OSX) && os(Linux) #elseif arch(i386) && arch(arm) #elseif _endian(big) && _endian(little) -#elseif _pointer_bit_width(_32) && _pointer_bit_width(_64) +#elseif _pointerBitWidth(_32) && _pointerBitWidth(_64) #elseif _runtime(_ObjC) && _runtime(_Native) #elseif targetEnvironment(simulator) #elseif swift(>=1.0) && _compiler_version("4.*.0") diff --git a/test/Parse/ConditionalCompilation/powerpc64LinuxTarget.swift b/test/Parse/ConditionalCompilation/powerpc64LinuxTarget.swift index 2f84e14d9b5f3..a8a78c78cf37e 100644 --- a/test/Parse/ConditionalCompilation/powerpc64LinuxTarget.swift +++ b/test/Parse/ConditionalCompilation/powerpc64LinuxTarget.swift @@ -1,7 +1,7 @@ // RUN: %swift -typecheck %s -verify -target powerpc64-unknown-linux-gnu -disable-objc-interop -parse-stdlib // RUN: %swift-ide-test -test-input-complete -source-filename=%s -target powerpc64-unknown-linux-gnu -#if arch(powerpc64) && os(Linux) && _runtime(_Native) && _endian(big) && _pointer_bit_width(_64) +#if arch(powerpc64) && os(Linux) && _runtime(_Native) && _endian(big) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/powerpc64leLinuxTarget.swift b/test/Parse/ConditionalCompilation/powerpc64leLinuxTarget.swift index d3db86e827085..3a44535d072a7 100644 --- a/test/Parse/ConditionalCompilation/powerpc64leLinuxTarget.swift +++ b/test/Parse/ConditionalCompilation/powerpc64leLinuxTarget.swift @@ -1,7 +1,7 @@ // RUN: %swift -typecheck %s -verify -target powerpc64le-unknown-linux-gnu -disable-objc-interop -parse-stdlib // RUN: %swift-ide-test -test-input-complete -source-filename=%s -target powerpc64le-unknown-linux-gnu -#if arch(powerpc64le) && os(Linux) && _runtime(_Native) && _endian(little) && _pointer_bit_width(_64) +#if arch(powerpc64le) && os(Linux) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/s390xLinuxTarget.swift b/test/Parse/ConditionalCompilation/s390xLinuxTarget.swift index 34205e2cc4b4c..5d81f205fde5c 100644 --- a/test/Parse/ConditionalCompilation/s390xLinuxTarget.swift +++ b/test/Parse/ConditionalCompilation/s390xLinuxTarget.swift @@ -1,7 +1,7 @@ // RUN: %swift -typecheck %s -verify -target s390x-unknown-linux-gnu -disable-objc-interop -parse-stdlib // RUN: %swift-ide-test -test-input-complete -source-filename=%s -target s390x-unknown-linux-gnu -#if arch(s390x) && os(Linux) && _runtime(_Native) && _endian(big) && _pointer_bit_width(_64) +#if arch(s390x) && os(Linux) && _runtime(_Native) && _endian(big) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/wasm32Target.swift b/test/Parse/ConditionalCompilation/wasm32Target.swift index 96e173ee4259f..a07f214642f07 100644 --- a/test/Parse/ConditionalCompilation/wasm32Target.swift +++ b/test/Parse/ConditionalCompilation/wasm32Target.swift @@ -1,7 +1,7 @@ // 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) +#if arch(wasm32) && os(WASI) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_32) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/x64AppleTVOSTarget.swift b/test/Parse/ConditionalCompilation/x64AppleTVOSTarget.swift index a3b83591023db..18efbed451547 100644 --- a/test/Parse/ConditionalCompilation/x64AppleTVOSTarget.swift +++ b/test/Parse/ConditionalCompilation/x64AppleTVOSTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(x86_64) && os(tvOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_64) +#if arch(x86_64) && os(tvOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/x64CygwinTarget.swift b/test/Parse/ConditionalCompilation/x64CygwinTarget.swift index 0cb351f8d1856..2d9ac6d6e7846 100644 --- a/test/Parse/ConditionalCompilation/x64CygwinTarget.swift +++ b/test/Parse/ConditionalCompilation/x64CygwinTarget.swift @@ -1,6 +1,6 @@ // RUN: %swift -typecheck %s -verify -target x86_64-unknown-windows-cygnus -disable-objc-interop -parse-stdlib // RUN: %swift-ide-test -test-input-complete -source-filename=%s -target x86_64-unknown-windows-cygnus -#if arch(x86_64) && os(Cygwin) && _runtime(_Native) && _endian(little) && _pointer_bit_width(_64) +#if arch(x86_64) && os(Cygwin) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/x64FreeBSDTarget.swift b/test/Parse/ConditionalCompilation/x64FreeBSDTarget.swift index 3ccfa33b0ae8e..0a54a5650435b 100644 --- a/test/Parse/ConditionalCompilation/x64FreeBSDTarget.swift +++ b/test/Parse/ConditionalCompilation/x64FreeBSDTarget.swift @@ -1,7 +1,7 @@ // RUN: %swift -typecheck %s -verify -target x86_64-unknown-freebsd10 -disable-objc-interop -parse-stdlib // RUN: %swift-ide-test -test-input-complete -source-filename=%s -target x86_64-unknown-freebsd10 -#if arch(x86_64) && os(FreeBSD) && _runtime(_Native) && _endian(little) && _pointer_bit_width(_64) +#if arch(x86_64) && os(FreeBSD) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/x64IOSTarget.swift b/test/Parse/ConditionalCompilation/x64IOSTarget.swift index 12263794dd25f..0d0c79091c67d 100644 --- a/test/Parse/ConditionalCompilation/x64IOSTarget.swift +++ b/test/Parse/ConditionalCompilation/x64IOSTarget.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(x86_64) && os(iOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_64) +#if arch(x86_64) && os(iOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/x64LinuxTarget.swift b/test/Parse/ConditionalCompilation/x64LinuxTarget.swift index 891a3e459c757..337d0d72bb054 100644 --- a/test/Parse/ConditionalCompilation/x64LinuxTarget.swift +++ b/test/Parse/ConditionalCompilation/x64LinuxTarget.swift @@ -1,7 +1,7 @@ // RUN: %swift -typecheck %s -verify -target x86_64-unknown-linux-gnu -disable-objc-interop -parse-stdlib // RUN: %swift-ide-test -test-input-complete -source-filename=%s -target x86_64-unknown-linux-gnu -#if arch(x86_64) && os(Linux) && _runtime(_Native) && _endian(little) && _pointer_bit_width(_64) +#if arch(x86_64) && os(Linux) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/x64OSXTarget.swift b/test/Parse/ConditionalCompilation/x64OSXTarget.swift index 877368e522251..8aeb0b03c76d6 100644 --- a/test/Parse/ConditionalCompilation/x64OSXTarget.swift +++ b/test/Parse/ConditionalCompilation/x64OSXTarget.swift @@ -1,14 +1,14 @@ // RUN: %swift -typecheck %s -verify -target x86_64-apple-macosx10.9 -parse-stdlib // RUN: %swift-ide-test -test-input-complete -source-filename=%s -target x86_64-apple-macosx10.9 -#if arch(x86_64) && os(OSX) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_64) +#if arch(x86_64) && os(OSX) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif var y = x -#if arch(x86_64) && os(macOS) && _runtime(_ObjC) && _endian(little) && _pointer_bit_width(_64) +#if arch(x86_64) && os(macOS) && _runtime(_ObjC) && _endian(little) && _pointerBitWidth(_64) class CC {} var xx = CC() #endif diff --git a/test/Parse/ConditionalCompilation/x64WindowsTarget.swift b/test/Parse/ConditionalCompilation/x64WindowsTarget.swift index ab8dfde2fb30d..36739552e8b14 100644 --- a/test/Parse/ConditionalCompilation/x64WindowsTarget.swift +++ b/test/Parse/ConditionalCompilation/x64WindowsTarget.swift @@ -1,7 +1,7 @@ // RUN: %swift -typecheck %s -verify -target x86_64-unknown-windows-msvc -disable-objc-interop -parse-stdlib // RUN: %swift-ide-test -test-input-complete -source-filename=%s -target x86_64-unknown-windows-msvc -#if arch(x86_64) && os(Windows) && _runtime(_Native) && _endian(little) && _pointer_bit_width(_64) +#if arch(x86_64) && os(Windows) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif diff --git a/test/Parse/ConditionalCompilation/x86_64PS4Target.swift b/test/Parse/ConditionalCompilation/x86_64PS4Target.swift index a7afdda30e1c8..77d2b1d635605 100644 --- a/test/Parse/ConditionalCompilation/x86_64PS4Target.swift +++ b/test/Parse/ConditionalCompilation/x86_64PS4Target.swift @@ -7,7 +7,7 @@ let i: Int = "Hello" #endif -#if arch(x86_64) && os(PS4) && _runtime(_Native) && _endian(little) && _pointer_bit_width(_64) +#if arch(x86_64) && os(PS4) && _runtime(_Native) && _endian(little) && _pointerBitWidth(_64) class C {} var x = C() #endif