aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Host.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-17 04:43:56 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-17 04:43:56 +0000
commitfdebc38523b397743973ff6a2d2e93b112dd96e5 (patch)
tree03c93b31dc3e434c640e0180231461400e390529 /lib/Support/Host.cpp
parent21506061ef031a01fce5cc1781f30780fbecb59b (diff)
downloadexternal_llvm-fdebc38523b397743973ff6a2d2e93b112dd96e5.zip
external_llvm-fdebc38523b397743973ff6a2d2e93b112dd96e5.tar.gz
external_llvm-fdebc38523b397743973ff6a2d2e93b112dd96e5.tar.bz2
Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Host.cpp')
-rw-r--r--lib/Support/Host.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Support/Host.cpp b/lib/Support/Host.cpp
index 3f3cdca..0f06964 100644
--- a/lib/Support/Host.cpp
+++ b/lib/Support/Host.cpp
@@ -61,6 +61,8 @@ static bool GetX86CpuIDAndInfo(unsigned value, unsigned *rEAX,
*rECX = registers[2];
*rEDX = registers[3];
return false;
+ #else
+ return true;
#endif
#elif defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)
#if defined(__GNUC__)
@@ -87,9 +89,14 @@ static bool GetX86CpuIDAndInfo(unsigned value, unsigned *rEAX,
mov dword ptr [esi],edx
}
return false;
+// pedantic #else returns to appease -Wunreachable-code (so we don't generate
+// postprocessed code that looks like "return true; return false;")
+ #else
+ return true;
#endif
-#endif
+#else
return true;
+#endif
}
static void DetectX86FamilyModel(unsigned EAX, unsigned &Family,