diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-12-12 12:42:31 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-12-12 12:42:31 +0000 |
commit | da8bafbf838d423272fbbb27de9ae4b96a4a795b (patch) | |
tree | 4b9126f7a5806faa188923427416ee39ba1105b0 /lib/System/Host.cpp | |
parent | 7b3f1a21ea0e5141b6a3a9d2a8ecec818bbdbdb9 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Host.cpp')
-rw-r--r-- | lib/System/Host.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/System/Host.cpp b/lib/System/Host.cpp index e112698349..2e02609bcb 100644 --- a/lib/System/Host.cpp +++ b/lib/System/Host.cpp @@ -107,7 +107,7 @@ static void DetectX86FamilyModel(unsigned EAX, unsigned &Family, unsigned &Model 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"; |