summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Triple.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-20 21:51:11 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-20 21:51:11 +0000
commit46a9f016c5fca708710e8c791675354cbf51fdfa (patch)
tree63642aaaa31ba6bc3ee7ee892cccee1bf17f5abc /llvm/lib/Support/Triple.cpp
parente4d798f07897a6378d0f2588e4c2335ec85ca935 (diff)
downloadbcm5719-llvm-46a9f016c5fca708710e8c791675354cbf51fdfa.tar.gz
bcm5719-llvm-46a9f016c5fca708710e8c791675354cbf51fdfa.zip
More dead code removal (using -Wunreachable-code)
llvm-svn: 148578
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r--llvm/lib/Support/Triple.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index 8daedf9ffe2..e69d4385c69 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -10,6 +10,7 @@
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/Support/ErrorHandling.h"
#include <cstring>
using namespace llvm;
@@ -42,7 +43,7 @@ const char *Triple::getArchTypeName(ArchType Kind) {
case amdil: return "amdil";
}
- return "<invalid>";
+ llvm_unreachable("Invalid ArchType!");
}
const char *Triple::getArchTypePrefix(ArchType Kind) {
@@ -86,7 +87,7 @@ const char *Triple::getVendorTypeName(VendorType Kind) {
case SCEI: return "scei";
}
- return "<invalid>";
+ llvm_unreachable("Invalid VendorType!");
}
const char *Triple::getOSTypeName(OSType Kind) {
@@ -115,7 +116,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
case NativeClient: return "nacl";
}
- return "<invalid>";
+ llvm_unreachable("Invalid OSType");
}
const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
@@ -129,7 +130,7 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
case ANDROIDEABI: return "androideabi";
}
- return "<invalid>";
+ llvm_unreachable("Invalid EnvironmentType!");
}
Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) {
OpenPOWER on IntegriCloud