From b7609cd35ff51710f7cb06289f01669dafca0dea Mon Sep 17 00:00:00 2001 From: Matt Beaumont-Gay Date: Fri, 7 Oct 2011 16:27:01 +0000 Subject: [PATCH] Move default to top of switch llvm-svn: 141366 --- llvm/lib/VMCore/Core.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp index 96760579b656..3c7807945280 100644 --- a/llvm/lib/VMCore/Core.cpp +++ b/llvm/lib/VMCore/Core.cpp @@ -660,25 +660,23 @@ LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size) { static LLVMOpcode map_to_llvmopcode(int opcode) { switch (opcode) { + default: + assert(0 && "Unhandled Opcode."); #define HANDLE_INST(num, opc, clas) case num: return LLVM##opc; #include "llvm/Instruction.def" #undef HANDLE_INST - default: - assert(false && "Unhandled Opcode."); } - return static_cast(0); } 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 - default: - assert(false && "Unhandled Opcode."); } - return 0; } /*--.. Constant expressions ................................................--*/