aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-12-13 08:59:40 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-12-13 08:59:40 +0000
commitc4174d675bb873b45fbc63777d388147cf27065a (patch)
tree87f8773d441776da278d74cb5d8ef14a57905444 /lib/System
parent0daf77e8034cfb70fbffbfa77d138b78b55af303 (diff)
downloadexternal_llvm-c4174d675bb873b45fbc63777d388147cf27065a.zip
external_llvm-c4174d675bb873b45fbc63777d388147cf27065a.tar.gz
external_llvm-c4174d675bb873b45fbc63777d388147cf27065a.tar.bz2
Using _MSC_VER there was wrong, better just use the already existing ifdefs for
x86 CPU detection for the X86 getHostCPUName too, and create a simple getHostCPUName that returns "generic" for all else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Host.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/System/Host.cpp b/lib/System/Host.cpp
index 2e02609..3196a63 100644
--- a/lib/System/Host.cpp
+++ b/lib/System/Host.cpp
@@ -103,11 +103,8 @@ static void DetectX86FamilyModel(unsigned EAX, unsigned &Family, unsigned &Model
Model += ((EAX >> 16) & 0xf) << 4; // Bits 16 - 19
}
}
-#endif
-
std::string sys::getHostCPUName() {
-#if defined(__x86_64__) || defined(__i386__) || defined(_MSC_VER)
unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0;
if (GetX86CpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX))
return "generic";
@@ -295,7 +292,9 @@ std::string sys::getHostCPUName() {
return "generic";
}
}
-#endif
-
+}
+#else
+std::string sys::getHostCPUName() {
return "generic";
}
+#endif