mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
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
This commit is contained in:
parent
30ba82933c
commit
917644d0c3
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user