1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

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 8be3999ea3
commit 111c0844d5
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; std::string CPUName = CPU;
if (CPUName.empty()) { 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(); CPUName = sys::getHostCPUName();
#else #else
CPUName = "generic"; CPUName = "generic";

View File

@ -342,7 +342,8 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU,
if (!FS.empty() || !CPU.empty()) { if (!FS.empty() || !CPU.empty()) {
std::string CPUName = CPU; std::string CPUName = CPU;
if (CPUName.empty()) { 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(); CPUName = sys::getHostCPUName();
#else #else
CPUName = "generic"; CPUName = "generic";