[llvm-commits] [llvm] r91217 - /llvm/trunk/lib/System/Host.cpp
Torok Edwin
edwintorok at gmail.com
Sat Dec 12 04:42:31 PST 2009
Author: edwin
Date: Sat Dec 12 06:42:31 2009
New Revision: 91217
URL: http://llvm.org/viewvc/llvm-project?rev=91217&view=rev
Log:
Enable CPU detection when using MS VS 2k8 too.
MSVS2k8 doesn't define __i386__, hence all the CPU detection code was disabled.
Enable it by looking for _MSC_VER.
Modified:
llvm/trunk/lib/System/Host.cpp
Modified: llvm/trunk/lib/System/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Host.cpp?rev=91217&r1=91216&r2=91217&view=diff
==============================================================================
--- llvm/trunk/lib/System/Host.cpp (original)
+++ llvm/trunk/lib/System/Host.cpp Sat Dec 12 06:42:31 2009
@@ -107,7 +107,7 @@
std::string sys::getHostCPUName() {
-#if defined(__x86_64__) || defined(__i386__)
+#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";
More information about the llvm-commits
mailing list