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/Target | |
parent | 17d2dbd5f9dd6c0de86398178f302ef46ba6ec79 (diff) | |
download | external_llvm-2dd674fdce68f8fd59d78a3bbab2cf5b8d220290.tar.gz external_llvm-2dd674fdce68f8fd59d78a3bbab2cf5b8d220290.tar.bz2 external_llvm-2dd674fdce68f8fd59d78a3bbab2cf5b8d220290.zip |
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/Target')
-rw-r--r-- | lib/Target/ARM/ARMConstantPoolValue.cpp | 2 | ||||
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 6 | ||||
-rw-r--r-- | lib/Target/Mips/MipsJITInfo.cpp | 3 |
3 files changed, 1 insertions, 10 deletions
diff --git a/lib/Target/ARM/ARMConstantPoolValue.cpp b/lib/Target/ARM/ARMConstantPoolValue.cpp index 9576283553..78dc78f9f3 100644 --- a/lib/Target/ARM/ARMConstantPoolValue.cpp +++ b/lib/Target/ARM/ARMConstantPoolValue.cpp @@ -48,7 +48,6 @@ ARMConstantPoolValue::~ARMConstantPoolValue() {} const char *ARMConstantPoolValue::getModifierText() const { switch (Modifier) { - default: llvm_unreachable("Unknown modifier!"); // FIXME: Are these case sensitive? It'd be nice to lower-case all the // strings if that's legal. case ARMCP::no_modifier: return "none"; @@ -58,6 +57,7 @@ const char *ARMConstantPoolValue::getModifierText() const { case ARMCP::GOTTPOFF: return "gottpoff"; case ARMCP::TPOFF: return "tpoff"; } + llvm_unreachable("Unknown modifier!"); } int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP, diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 7e5e770a38..021803de71 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -2866,8 +2866,6 @@ parseVectorList(SmallVectorImpl<MCParsedAsmOperand*> &Operands) { if (Res != MatchOperand_Success) return Res; switch (LaneKind) { - default: - assert(0 && "unexpected lane kind!"); case NoLanes: E = Parser.getTok().getLoc(); Operands.push_back(ARMOperand::CreateVectorList(Reg, 1, false, S, E)); @@ -2891,8 +2889,6 @@ parseVectorList(SmallVectorImpl<MCParsedAsmOperand*> &Operands) { if (Res != MatchOperand_Success) return Res; switch (LaneKind) { - default: - assert(0 && "unexpected lane kind!"); case NoLanes: E = Parser.getTok().getLoc(); Operands.push_back(ARMOperand::CreateVectorList(Reg, 2, false, S, E)); @@ -3063,8 +3059,6 @@ parseVectorList(SmallVectorImpl<MCParsedAsmOperand*> &Operands) { Parser.Lex(); // Eat '}' token. switch (LaneKind) { - default: - assert(0 && "unexpected lane kind in register list."); case NoLanes: Operands.push_back(ARMOperand::CreateVectorList(FirstReg, Count, (Spacing == 2), S, E)); diff --git a/lib/Target/Mips/MipsJITInfo.cpp b/lib/Target/Mips/MipsJITInfo.cpp index 27d5918c8b..b15d290d6c 100644 --- a/lib/Target/Mips/MipsJITInfo.cpp +++ b/lib/Target/Mips/MipsJITInfo.cpp @@ -228,9 +228,6 @@ void MipsJITInfo::relocate(void *Function, MachineRelocation *MR, *((unsigned*) RelocPos) |= (unsigned) ResultPtr; break; } - - default: - llvm_unreachable("ERROR: Unknown Mips relocation."); } } } |