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
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp
index fa9071b..1fc70e6 100644
--- a/lib/Analysis/IPA/Andersens.cpp
+++ b/lib/Analysis/IPA/Andersens.cpp
@@ -260,7 +260,9 @@
 
       std::map<Value*, unsigned>::iterator I = ValueNodes.find(V);
       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!");
       }
       return &GraphNodes[I->second];
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 5282252..186b041 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -421,7 +421,9 @@
   } else {
     switch (Node->getOpcode()) {
     default:
-      DEBUG(Node->dump()); 
+#ifndef NDEBUG
+      Node->dump();
+#endif
       assert(0 && "This target-independent node should have been selected!");
     case ISD::EntryToken: // fall thru
     case ISD::TokenFactor:
diff --git a/lib/Target/IA64/IA64ISelDAGToDAG.cpp b/lib/Target/IA64/IA64ISelDAGToDAG.cpp
index d004f0c..2289687 100644
--- a/lib/Target/IA64/IA64ISelDAGToDAG.cpp
+++ b/lib/Target/IA64/IA64ISelDAGToDAG.cpp
@@ -511,7 +511,11 @@
       N->getValueType(0) : cast<VTSDNode>(N->getOperand(3))->getVT();
     unsigned Opc;
     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
       Opc = IA64::LD1; // first we load a byte, then compare for != 0
       if(N->getValueType(0) == MVT::i1) { // XXX: early exit!