diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2011-10-07 16:27:01 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2011-10-07 16:27:01 +0000 |
commit | 7761948761d60209a5d5bf2f09a3249ccc0168e6 (patch) | |
tree | a87ca96114dafd03bb8e40fbec7fbe84c9a1a8e1 /lib/VMCore | |
parent | 244455e6d6bb95c5e556ace66adb148dbcd16a27 (diff) | |
download | external_llvm-7761948761d60209a5d5bf2f09a3249ccc0168e6.zip external_llvm-7761948761d60209a5d5bf2f09a3249ccc0168e6.tar.gz external_llvm-7761948761d60209a5d5bf2f09a3249ccc0168e6.tar.bz2 |
Move default to top of switch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Core.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 9676057..3c78079 100644 --- a/lib/VMCore/Core.cpp +++ b/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<LLVMOpcode>(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 ................................................--*/ |