From 111c0844d5bbd6fbd200a71dcd43d65de8668eae Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 30 Jan 2012 23:10:32 +0000 Subject: [PATCH] PR11834: Use macros which are defined on Windows. Patch by Marina Yatsina. llvm-svn: 149294 --- lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp | 3 ++- lib/Target/X86/X86Subtarget.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp index 5a3fc589148..4db1e2f45f8 100644 --- a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp +++ b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp @@ -331,7 +331,8 @@ MCSubtargetInfo *X86_MC::createX86MCSubtargetInfo(StringRef TT, StringRef CPU, std::string CPUName = CPU; if (CPUName.empty()) { -#if defined (__x86_64__) || defined(__i386__) +#if defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)\ + || defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64) CPUName = sys::getHostCPUName(); #else CPUName = "generic"; diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index f4a6261973e..718497e3342 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -342,7 +342,8 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU, if (!FS.empty() || !CPU.empty()) { std::string CPUName = CPU; if (CPUName.empty()) { -#if defined (__x86_64__) || defined(__i386__) +#if defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)\ + || defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64) CPUName = sys::getHostCPUName(); #else CPUName = "generic";