From: David Majnemer Date: Sun, 26 Jul 2015 23:17:29 +0000 (+0000) Subject: [Targets] Define _M_AMD64 and _M_X64 to a more appropriate value X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a65e26a37e6865b4b0d2ad7ac90bb09bd8501c9;p=clang [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243255 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 2d71517019..8ecaeaf1d1 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -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"); } }; diff --git a/test/Preprocessor/predefined-macros.c b/test/Preprocessor/predefined-macros.c index a32f4a158c..4130f7aefb 100644 --- a/test/Preprocessor/predefined-macros.c +++ b/test/Preprocessor/predefined-macros.c @@ -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