Fix -Asserts warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98928 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
index fba380d..33db90e 100644
--- a/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
@@ -30,6 +30,9 @@
static unsigned NextReg(unsigned Reg) {
switch (Reg) {
+ default:
+ assert(0 && "Unexpected register enum");
+
case ARM::D0:
return ARM::D1;
case ARM::D1:
@@ -92,9 +95,6 @@
return ARM::D30;
case ARM::D30:
return ARM::D31;
-
- default:
- assert(0 && "Unexpected register enum");
}
}
@@ -212,8 +212,7 @@
O << getRegisterName(Reg);
}
} else if (Op.isImm()) {
- bool isCallOp = Modifier && !strcmp(Modifier, "call");
- assert(isCallOp ||
+ assert((Modifier && !strcmp(Modifier, "call")) ||
((Modifier == 0 || Modifier[0] == 0) && "No modifiers supported"));
O << '#' << Op.getImm();
} else {