Remove some gross code by using the Value::dump method to do debug dumps
[oota-llvm.git] / lib / VMCore / iBranch.cpp
index d0f437e293b87667ada8c0e9a7dc049b2fbe8cbc..7a352eeb46eefe2f6628b57772da083cc0d8c3d7 100644 (file)
@@ -9,7 +9,7 @@
 #include "llvm/BasicBlock.h"
 #ifndef NDEBUG
 #include "llvm/Type.h"       // Only used for assertions...
-#include "llvm/Assembly/Writer.h"
+#include <iostream>
 #endif
 
 BranchInst::BranchInst(BasicBlock *True, BasicBlock *False, Value *Cond) 
@@ -26,8 +26,11 @@ BranchInst::BranchInst(BasicBlock *True, BasicBlock *False, Value *Cond)
         "Either both cond and false or neither can be specified!");
 
 #ifndef NDEBUG
-  if (Cond != 0 && Cond->getType() != Type::BoolTy)
-    cerr << "Bad Condition: " << Cond << endl;
+  if (Cond != 0 && Cond->getType() != Type::BoolTy) {
+    std::cerr << "Bad Condition: ";
+    Cond->dump();
+    std::cerr << "\n";
+  }
 #endif
   assert((Cond == 0 || Cond->getType() == Type::BoolTy) && 
          "May only branch on boolean predicates!!!!");