summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-16 23:24:27 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-16 23:24:27 +0000
commit486df738c305eeb148d557a94777f2c04aa72d40 (patch)
treebc1953ce53be6eb05f8602c42ed18e93473437c1 /llvm/lib/Target/ARM
parentb1691ccaaa50f432f24d67759d9e78052f34cacd (diff)
downloadbcm5719-llvm-486df738c305eeb148d557a94777f2c04aa72d40.tar.gz
bcm5719-llvm-486df738c305eeb148d557a94777f2c04aa72d40.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) llvm-svn: 148262
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r--llvm/lib/Target/ARM/ARMConstantPoolValue.cpp2
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp6
2 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp b/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
index 9576283553b..78dc78f9f33 100644
--- a/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
+++ b/llvm/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/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 7e5e770a38b..021803de711 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/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));
OpenPOWER on IntegriCloud