Removed #include <iostream> and used the llvm_cerr/DOUT streams instead.
[oota-llvm.git] / lib / Transforms / Instrumentation / TraceBasicBlocks.cpp
index 003ea0d26ae3c071708b57f74a6f11479e54bc1b..076fa81074222434b3fb4a8db157288715e43f3f 100644 (file)
@@ -23,7 +23,6 @@
 #include "ProfilingUtils.h"
 #include "llvm/Support/Debug.h"
 #include <set>
-#include <iostream>
 using namespace llvm;
 
 namespace {
@@ -43,8 +42,8 @@ ModulePass *llvm::createTraceBasicBlockPass()
 static void InsertInstrumentationCall (BasicBlock *BB,
                                        const std::string FnName,
                                        unsigned BBNumber) {
-  DEBUG (std::cerr << "InsertInstrumentationCall (\"" << BB->getName ()
-                   << "\", \"" << FnName << "\", " << BBNumber << ")\n");
+  DOUT << "InsertInstrumentationCall (\"" << BB->getName ()
+       << "\", \"" << FnName << "\", " << BBNumber << ")\n";
   Module &M = *BB->getParent ()->getParent ();
   Function *InstrFn = M.getOrInsertFunction (FnName, Type::VoidTy,
                                              Type::UIntTy, (Type *)0);
@@ -62,7 +61,7 @@ static void InsertInstrumentationCall (BasicBlock *BB,
 bool TraceBasicBlocks::runOnModule(Module &M) {
   Function *Main = M.getMainFunction();
   if (Main == 0) {
-    std::cerr << "WARNING: cannot insert basic-block trace instrumentation"
+    llvm_cerr << "WARNING: cannot insert basic-block trace instrumentation"
               << " into a module with no main function!\n";
     return false;  // No main, no instrumentation!
   }