It was pointed out that DEBUG() is only available with -debug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29106 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Laskey 2006-07-11 18:25:13 +00:00
parent e37fe9b3a1
commit 16d42c6ac6
4 changed files with 23 additions and 7 deletions

View File

@ -260,7 +260,9 @@ namespace {
std::map<Value*, unsigned>::iterator I = ValueNodes.find(V); std::map<Value*, unsigned>::iterator I = ValueNodes.find(V);
if (I == ValueNodes.end()) { if (I == ValueNodes.end()) {
DEBUG(V->dump()); #ifndef NDEBUG
V->dump();
#endif
assert(0 && "Value does not have a node in the points-to graph!"); assert(0 && "Value does not have a node in the points-to graph!");
} }
return &GraphNodes[I->second]; return &GraphNodes[I->second];

View File

@ -421,7 +421,9 @@ void ScheduleDAG::EmitNode(SDNode *Node,
} else { } else {
switch (Node->getOpcode()) { switch (Node->getOpcode()) {
default: default:
DEBUG(Node->dump()); #ifndef NDEBUG
Node->dump();
#endif
assert(0 && "This target-independent node should have been selected!"); assert(0 && "This target-independent node should have been selected!");
case ISD::EntryToken: // fall thru case ISD::EntryToken: // fall thru
case ISD::TokenFactor: case ISD::TokenFactor:

View File

@ -511,7 +511,11 @@ void IA64DAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
N->getValueType(0) : cast<VTSDNode>(N->getOperand(3))->getVT(); N->getValueType(0) : cast<VTSDNode>(N->getOperand(3))->getVT();
unsigned Opc; unsigned Opc;
switch (TypeBeingLoaded) { switch (TypeBeingLoaded) {
default: DEBUG(N->dump()); assert(0 && "Cannot load this type!"); default:
#ifndef NDEBUG
N->dump();
#endif
assert(0 && "Cannot load this type!");
case MVT::i1: { // this is a bool case MVT::i1: { // this is a bool
Opc = IA64::LD1; // first we load a byte, then compare for != 0 Opc = IA64::LD1; // first we load a byte, then compare for != 0
if(N->getValueType(0) == MVT::i1) { // XXX: early exit! if(N->getValueType(0) == MVT::i1) { // XXX: early exit!

View File

@ -2136,7 +2136,9 @@ public:
if (DefInit *Pred = dynamic_cast<DefInit*>(Predicates->getElement(i))) { if (DefInit *Pred = dynamic_cast<DefInit*>(Predicates->getElement(i))) {
Record *Def = Pred->getDef(); Record *Def = Pred->getDef();
if (!Def->isSubClassOf("Predicate")) { if (!Def->isSubClassOf("Predicate")) {
DEBUG(Def->dump()); #ifndef NDEBUG
Def->dump();
#endif
assert(0 && "Unknown predicate type!"); assert(0 && "Unknown predicate type!");
} }
if (!PredicateCheck.empty()) if (!PredicateCheck.empty())
@ -2344,8 +2346,10 @@ public:
emitCheck("cast<CondCodeSDNode>(" + RootName + utostr(OpNo) + emitCheck("cast<CondCodeSDNode>(" + RootName + utostr(OpNo) +
")->get() == ISD::" + LeafRec->getName()); ")->get() == ISD::" + LeafRec->getName());
} else { } else {
DEBUG(Child->dump()); #ifndef NDEBUG
Child->dump();
std::cerr << " "; std::cerr << " ";
#endif
assert(0 && "Unknown leaf type!"); assert(0 && "Unknown leaf type!");
} }
} else if (IntInit *II = } else if (IntInit *II =
@ -2357,7 +2361,9 @@ public:
emitCheck("CN" + utostr(CTmp) + " == " +itostr(II->getValue())); emitCheck("CN" + utostr(CTmp) + " == " +itostr(II->getValue()));
} else { } else {
DEBUG(Child->dump()); #ifndef NDEBUG
Child->dump();
#endif
assert(0 && "Unknown leaf type!"); assert(0 && "Unknown leaf type!");
} }
} }
@ -2510,7 +2516,9 @@ public:
return std::make_pair(1, ResNo); return std::make_pair(1, ResNo);
} }
DEBUG(N->dump()); #ifndef NDEBUG
N->dump();
#endif
assert(0 && "Unknown leaf type!"); assert(0 && "Unknown leaf type!");
return std::make_pair(1, ~0U); return std::make_pair(1, ~0U);
} }