mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Removing unused default switch cases in switches over enums that already account for all enumeration values explicitly.
(This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -690,12 +690,11 @@ static LLVMOpcode map_to_llvmopcode(int opcode)
|
||||
static int map_from_llvmopcode(LLVMOpcode code)
|
||||
{
|
||||
switch (code) {
|
||||
default:
|
||||
assert(0 && "Unhandled Opcode.");
|
||||
#define HANDLE_INST(num, opc, clas) case LLVM##opc: return num;
|
||||
#include "llvm/Instruction.def"
|
||||
#undef HANDLE_INST
|
||||
}
|
||||
llvm_unreachable("Unhandled Opcode.");
|
||||
}
|
||||
|
||||
/*--.. Constant expressions ................................................--*/
|
||||
|
Reference in New Issue
Block a user