PR11834: Use macros which are defined on Windows. Patch by Marina Yatsina.

llvm-svn: 149294
This commit is contained in:
Evan Cheng 2012-01-30 23:10:32 +00:00
parent fcbd65d27b
commit 4e7992eeba
2 changed files with 4 additions and 2 deletions

View File

@ -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";

View File

@ -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";