Fix -Asserts warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2010-03-19 03:18:23 +00:00
parent 65f35d5703
commit 6b7c2cf5d4

View File

@ -30,6 +30,9 @@ using namespace llvm;
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 @@ static unsigned NextReg(unsigned Reg) {
return ARM::D30;
case ARM::D30:
return ARM::D31;
default:
assert(0 && "Unexpected register enum");
}
}
@ -212,8 +212,7 @@ void ARMInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
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 {