forked from OSchip/llvm-project
Change:
assert(!"error message"); To: assert(0 && "error message"); which is more consistant across the code base. llvm-svn: 140234
This commit is contained in:
parent
3d673cc323
commit
a318b8dce6
|
@ -55,7 +55,7 @@ ConstantRange ConstantRange::makeICmpRegion(unsigned Pred,
|
|||
|
||||
uint32_t W = CR.getBitWidth();
|
||||
switch (Pred) {
|
||||
default: assert(!"Invalid ICmp predicate to makeICmpRegion()");
|
||||
default: assert(0 && "Invalid ICmp predicate to makeICmpRegion()");
|
||||
case CmpInst::ICMP_EQ:
|
||||
return CR;
|
||||
case CmpInst::ICMP_NE:
|
||||
|
|
|
@ -1298,7 +1298,7 @@ void CppWriter::printInstruction(const Instruction *I,
|
|||
case Instruction::PtrToInt: Out << "PtrToIntInst"; break;
|
||||
case Instruction::IntToPtr: Out << "IntToPtrInst"; break;
|
||||
case Instruction::BitCast: Out << "BitCastInst"; break;
|
||||
default: assert(!"Unreachable"); break;
|
||||
default: assert(0 && "Unreachable"); break;
|
||||
}
|
||||
Out << "(" << opNames[0] << ", "
|
||||
<< getCppName(cst->getType()) << ", \"";
|
||||
|
|
|
@ -11946,11 +11946,11 @@ MachineBasicBlock *
|
|||
X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||
MachineBasicBlock *BB) const {
|
||||
switch (MI->getOpcode()) {
|
||||
default: assert(false && "Unexpected instr type to insert");
|
||||
default: assert(0 && "Unexpected instr type to insert");
|
||||
case X86::TAILJMPd64:
|
||||
case X86::TAILJMPr64:
|
||||
case X86::TAILJMPm64:
|
||||
assert(!"TAILJMP64 would not be touched here.");
|
||||
assert(0 && "TAILJMP64 would not be touched here.");
|
||||
case X86::TCRETURNdi64:
|
||||
case X86::TCRETURNri64:
|
||||
case X86::TCRETURNmi64:
|
||||
|
|
|
@ -105,7 +105,7 @@ Constant *Constant::getNullValue(Type *Ty) {
|
|||
return ConstantAggregateZero::get(Ty);
|
||||
default:
|
||||
// Function, Label, or Opaque type?
|
||||
assert(!"Cannot create a null constant of that type!");
|
||||
assert(0 && "Cannot create a null constant of that type!");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2022,7 +2022,7 @@ bool CastInst::isNoopCast(Instruction::CastOps Opcode,
|
|||
Type *IntPtrTy) {
|
||||
switch (Opcode) {
|
||||
default:
|
||||
assert(!"Invalid CastOp");
|
||||
assert(0 && "Invalid CastOp");
|
||||
case Instruction::Trunc:
|
||||
case Instruction::ZExt:
|
||||
case Instruction::SExt:
|
||||
|
@ -2215,10 +2215,10 @@ unsigned CastInst::isEliminableCastPair(
|
|||
case 99:
|
||||
// cast combination can't happen (error in input). This is for all cases
|
||||
// where the MidTy is not the same for the two cast instructions.
|
||||
assert(!"Invalid Cast Combination");
|
||||
assert(0 && "Invalid Cast Combination");
|
||||
return 0;
|
||||
default:
|
||||
assert(!"Error in CastResults table!!!");
|
||||
assert(0 && "Error in CastResults table!!!");
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
@ -2242,7 +2242,7 @@ CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty,
|
|||
case IntToPtr: return new IntToPtrInst (S, Ty, Name, InsertBefore);
|
||||
case BitCast: return new BitCastInst (S, Ty, Name, InsertBefore);
|
||||
default:
|
||||
assert(!"Invalid opcode provided");
|
||||
assert(0 && "Invalid opcode provided");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -2265,7 +2265,7 @@ CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty,
|
|||
case IntToPtr: return new IntToPtrInst (S, Ty, Name, InsertAtEnd);
|
||||
case BitCast: return new BitCastInst (S, Ty, Name, InsertAtEnd);
|
||||
default:
|
||||
assert(!"Invalid opcode provided");
|
||||
assert(0 && "Invalid opcode provided");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -2549,17 +2549,17 @@ CastInst::getCastOpcode(
|
|||
} else if (SrcTy->isIntegerTy()) {
|
||||
return IntToPtr; // int -> ptr
|
||||
} else {
|
||||
assert(!"Casting pointer to other than pointer or int");
|
||||
assert(0 && "Casting pointer to other than pointer or int");
|
||||
}
|
||||
} else if (DestTy->isX86_MMXTy()) {
|
||||
if (SrcTy->isVectorTy()) {
|
||||
assert(DestBits == SrcBits && "Casting vector of wrong width to X86_MMX");
|
||||
return BitCast; // 64-bit vector to MMX
|
||||
} else {
|
||||
assert(!"Illegal cast to X86_MMX");
|
||||
assert(0 && "Illegal cast to X86_MMX");
|
||||
}
|
||||
} else {
|
||||
assert(!"Casting to type that is not first-class");
|
||||
assert(0 && "Casting to type that is not first-class");
|
||||
}
|
||||
|
||||
// If we fall through to here we probably hit an assertion cast above
|
||||
|
@ -2869,7 +2869,7 @@ bool CmpInst::isEquality() const {
|
|||
|
||||
CmpInst::Predicate CmpInst::getInversePredicate(Predicate pred) {
|
||||
switch (pred) {
|
||||
default: assert(!"Unknown cmp predicate!");
|
||||
default: assert(0 && "Unknown cmp predicate!");
|
||||
case ICMP_EQ: return ICMP_NE;
|
||||
case ICMP_NE: return ICMP_EQ;
|
||||
case ICMP_UGT: return ICMP_ULE;
|
||||
|
@ -2902,7 +2902,7 @@ CmpInst::Predicate CmpInst::getInversePredicate(Predicate pred) {
|
|||
|
||||
ICmpInst::Predicate ICmpInst::getSignedPredicate(Predicate pred) {
|
||||
switch (pred) {
|
||||
default: assert(! "Unknown icmp predicate!");
|
||||
default: assert(0 && "Unknown icmp predicate!");
|
||||
case ICMP_EQ: case ICMP_NE:
|
||||
case ICMP_SGT: case ICMP_SLT: case ICMP_SGE: case ICMP_SLE:
|
||||
return pred;
|
||||
|
@ -2915,7 +2915,7 @@ ICmpInst::Predicate ICmpInst::getSignedPredicate(Predicate pred) {
|
|||
|
||||
ICmpInst::Predicate ICmpInst::getUnsignedPredicate(Predicate pred) {
|
||||
switch (pred) {
|
||||
default: assert(! "Unknown icmp predicate!");
|
||||
default: assert(0 && "Unknown icmp predicate!");
|
||||
case ICMP_EQ: case ICMP_NE:
|
||||
case ICMP_UGT: case ICMP_ULT: case ICMP_UGE: case ICMP_ULE:
|
||||
return pred;
|
||||
|
@ -2991,7 +2991,7 @@ ICmpInst::makeConstantRange(Predicate pred, const APInt &C) {
|
|||
|
||||
CmpInst::Predicate CmpInst::getSwappedPredicate(Predicate pred) {
|
||||
switch (pred) {
|
||||
default: assert(!"Unknown cmp predicate!");
|
||||
default: assert(0 && "Unknown cmp predicate!");
|
||||
case ICMP_EQ: case ICMP_NE:
|
||||
return pred;
|
||||
case ICMP_SGT: return ICMP_SLT;
|
||||
|
|
Loading…
Reference in New Issue