diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:51:11 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:51:11 +0000 |
commit | 4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 (patch) | |
tree | 9a48fa9f7f51fd635f6807ed7444fcdcad0e9bda /lib/Support/Triple.cpp | |
parent | 0041d4d447c26825e566ba38a4fe301471fda1eb (diff) |
More dead code removal (using -Wunreachable-code)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Triple.cpp')
-rw-r--r-- | lib/Support/Triple.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index 8daedf9ffe..e69d4385c6 100644 --- a/lib/Support/Triple.cpp +++ b/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) { |