r243255 - [Targets] Define _M_AMD64 and _M_X64 to a more appropriate value
David Majnemer
david.majnemer at gmail.com
Sun Jul 26 16:17:30 PDT 2015
Author: majnemer
Date: Sun Jul 26 18:17:29 2015
New Revision: 243255
URL: http://llvm.org/viewvc/llvm-project?rev=243255&view=rev
Log:
[Targets] Define _M_AMD64 and _M_X64 to a more appropriate value
We used to define them to 1, we should have defined them to 100.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Preprocessor/predefined-macros.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=243255&r1=243254&r2=243255&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Sun Jul 26 18:17:29 2015
@@ -4000,8 +4000,8 @@ public:
MacroBuilder &Builder) const override {
WindowsX86_64TargetInfo::getTargetDefines(Opts, Builder);
WindowsX86_64TargetInfo::getVisualStudioDefines(Opts, Builder);
- Builder.defineMacro("_M_X64");
- Builder.defineMacro("_M_AMD64");
+ Builder.defineMacro("_M_X64", "100");
+ Builder.defineMacro("_M_AMD64", "100");
}
};
Modified: cfe/trunk/test/Preprocessor/predefined-macros.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/predefined-macros.c?rev=243255&r1=243254&r2=243255&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/predefined-macros.c (original)
+++ cfe/trunk/test/Preprocessor/predefined-macros.c Sun Jul 26 18:17:29 2015
@@ -18,8 +18,8 @@
// CHECK-MS64: #define _INTEGRAL_MAX_BITS 64
// CHECK-MS64: #define _MSC_EXTENSIONS 1
// CHECK-MS64: #define _MSC_VER 1300
-// CHECK-MS64: #define _M_AMD64 1
-// CHECK-MS64: #define _M_X64 1
+// CHECK-MS64: #define _M_AMD64 100
+// CHECK-MS64: #define _M_X64 100
// CHECK-MS64: #define _WIN64 1
// CHECK-MS64-NOT: #define __STRICT_ANSI__
// CHECK-MS64-NOT: GCC
More information about the cfe-commits
mailing list