diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-16 23:24:27 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-16 23:24:27 +0000 |
commit | 2dd674fdce68f8fd59d78a3bbab2cf5b8d220290 (patch) | |
tree | 8b7a43bbe2df7368233f7c1c688a09632ba12bbd /lib/VMCore | |
parent | 17d2dbd5f9dd6c0de86398178f302ef46ba6ec79 (diff) | |
download | external_llvm-2dd674fdce68f8fd59d78a3bbab2cf5b8d220290.zip external_llvm-2dd674fdce68f8fd59d78a3bbab2cf5b8d220290.tar.gz external_llvm-2dd674fdce68f8fd59d78a3bbab2cf5b8d220290.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Core.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 69fb75f..35315df 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -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 ................................................--*/ |