diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:51:11 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:51:11 +0000 |
commit | 4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 (patch) | |
tree | 9a48fa9f7f51fd635f6807ed7444fcdcad0e9bda /lib/MC/MCDisassembler | |
parent | 0041d4d447c26825e566ba38a4fe301471fda1eb (diff) | |
download | external_llvm-4d6ccb5f68cd7c6418a209f1fa4dbade569e4493.zip external_llvm-4d6ccb5f68cd7c6418a209f1fa4dbade569e4493.tar.gz external_llvm-4d6ccb5f68cd7c6418a209f1fa4dbade569e4493.tar.bz2 |
More dead code removal (using -Wunreachable-code)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCDisassembler')
-rw-r--r-- | lib/MC/MCDisassembler/Disassembler.cpp | 3 | ||||
-rw-r--r-- | lib/MC/MCDisassembler/EDOperand.cpp | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/MC/MCDisassembler/Disassembler.cpp b/lib/MC/MCDisassembler/Disassembler.cpp index f156760..9eb99d2 100644 --- a/lib/MC/MCDisassembler/Disassembler.cpp +++ b/lib/MC/MCDisassembler/Disassembler.cpp @@ -18,6 +18,7 @@ #include "llvm/MC/MCRegisterInfo.h" #include "llvm/Support/MemoryObject.h" #include "llvm/Support/TargetRegistry.h" +#include "llvm/Support/ErrorHandling.h" namespace llvm { class Target; @@ -163,5 +164,5 @@ size_t LLVMDisasmInstruction(LLVMDisasmContextRef DCR, uint8_t *Bytes, return Size; } } - return 0; + llvm_unreachable("Invalid DecodeStatus!"); } diff --git a/lib/MC/MCDisassembler/EDOperand.cpp b/lib/MC/MCDisassembler/EDOperand.cpp index 6a4e56f..9aededb 100644 --- a/lib/MC/MCDisassembler/EDOperand.cpp +++ b/lib/MC/MCDisassembler/EDOperand.cpp @@ -200,7 +200,6 @@ int EDOperand::evaluate(uint64_t &result, return 0; } } // switch (operandType) - break; case Triple::arm: case Triple::thumb: switch (operandType) { @@ -236,10 +235,7 @@ int EDOperand::evaluate(uint64_t &result, return 0; } } - break; } - - return -1; } int EDOperand::isRegister() { |