[PATCH] D40285: [MS] AARCH64 cleanup default WIN macros
Martell Malone via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 21 00:18:12 PST 2017
martell created this revision.
Herald added subscribers: kristof.beyls, javed.absar, rengolin, aemerson.
_WIN32 is already defined in lib/Basic/Targets/OSTargets.h
WIN32 and WIN64 are not real definitions they are typically
defined by the system headers, _WIN32 and _WIN64 are the
compiler definitions.
Repository:
rL LLVM
https://reviews.llvm.org/D40285
Files:
lib/Basic/Targets/AArch64.cpp
test/Preprocessor/predefined-macros.c
Index: test/Preprocessor/predefined-macros.c
===================================================================
--- test/Preprocessor/predefined-macros.c
+++ test/Preprocessor/predefined-macros.c
@@ -204,8 +204,6 @@
// RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-ARM64-MINGW
// CHECK-ARM64-MINGW-NOT: #define _M_ARM64 1
-// CHECK-ARM64-MINGW: #define WIN32 1
-// CHECK-ARM64-MINGW: #define WIN64 1
// CHECK-ARM64-MINGW: #define _WIN32 1
// CHECK-ARM64-MINGW: #define _WIN64 1
// CHECK-ARM64-MINGW: #define __aarch64__ 1
Index: lib/Basic/Targets/AArch64.cpp
===================================================================
--- lib/Basic/Targets/AArch64.cpp
+++ lib/Basic/Targets/AArch64.cpp
@@ -474,7 +474,6 @@
void MicrosoftARM64TargetInfo::getVisualStudioDefines(
const LangOptions &Opts, MacroBuilder &Builder) const {
WindowsTargetInfo<AArch64leTargetInfo>::getVisualStudioDefines(Opts, Builder);
- Builder.defineMacro("_WIN32", "1");
Builder.defineMacro("_WIN64", "1");
Builder.defineMacro("_M_ARM64", "1");
}
@@ -494,10 +493,7 @@
void MinGWARM64TargetInfo::getTargetDefines(const LangOptions &Opts,
MacroBuilder &Builder) const {
WindowsTargetInfo::getTargetDefines(Opts, Builder);
- Builder.defineMacro("_WIN32", "1");
Builder.defineMacro("_WIN64", "1");
- Builder.defineMacro("WIN32", "1");
- Builder.defineMacro("WIN64", "1");
addMinGWDefines(Opts, Builder);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40285.123725.patch
Type: text/x-patch
Size: 1475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171121/23a4b4cf/attachment.bin>
More information about the cfe-commits
mailing list