aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/NVPTX
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-05-04 21:35:49 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-05-04 21:35:49 +0000
commit917644d0c347950f8e77f52797cb89ceb771215d (patch)
tree9e1c4ae7e0db3d61ec67ace5d974d90e86493532 /lib/Target/NVPTX
parent30ba82933c433611e05b07ef95da36bba8721b8b (diff)
Fix a Clang warning in the new NVPTX backend:
In file included from ../lib/Target/NVPTX/VectorElementize.cpp:53: ../lib/Target/NVPTX/NVPTX.h:44:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] default: assert(0 && "Unknown condition code"); ^ 1 warning generated. The prevailing pattern in LLVM is to not use a default label, and instead to use llvm_unreachable to denote that the switch in fact covers all return paths from the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/NVPTX')
-rw-r--r--lib/Target/NVPTX/NVPTX.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/NVPTX/NVPTX.h b/lib/Target/NVPTX/NVPTX.h
index ebdf423eb2..8ec8eb36b0 100644
--- a/lib/Target/NVPTX/NVPTX.h
+++ b/lib/Target/NVPTX/NVPTX.h
@@ -41,7 +41,6 @@ enum CondCodes {
inline static const char *NVPTXCondCodeToString(NVPTXCC::CondCodes CC) {
switch (CC) {
- default: assert(0 && "Unknown condition code");
case NVPTXCC::NE: return "ne";
case NVPTXCC::EQ: return "eq";
case NVPTXCC::LT: return "lt";
@@ -49,6 +48,7 @@ inline static const char *NVPTXCondCodeToString(NVPTXCC::CondCodes CC) {
case NVPTXCC::GT: return "gt";
case NVPTXCC::GE: return "ge";
}
+ llvm_unreachable("Unknown condition code");
}
FunctionPass *createNVPTXISelDag(NVPTXTargetMachine &TM,