From 2dd674fdce68f8fd59d78a3bbab2cf5b8d220290 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 16 Jan 2012 23:24:27 +0000 Subject: 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 --- lib/VMCore/Core.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/VMCore/Core.cpp') diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 69fb75f01c..35315df220 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 ................................................--*/ -- cgit v1.2.3-70-g09d2