summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Instrumentation/TraceBasicBlocks.cpp')
-rw-r--r--lib/Transforms/Instrumentation/TraceBasicBlocks.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
index 003ea0d26a..076fa81074 100644
--- a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
+++ b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
@@ -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!
}