diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-08-23 11:37:21 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-08-23 11:37:21 +0000 |
commit | cfa6ec92e61a1ab040c2b79db5de3a39df732ff6 (patch) | |
tree | 3b2d0a185a206d9340c40ca55c8d65386ae7e07b /lib/Transforms/Instrumentation | |
parent | 895ae9b30d4b652a41a0d0b8882d3a0fc4cadc13 (diff) | |
download | external_llvm-cfa6ec92e61a1ab040c2b79db5de3a39df732ff6.zip external_llvm-cfa6ec92e61a1ab040c2b79db5de3a39df732ff6.tar.gz external_llvm-cfa6ec92e61a1ab040c2b79db5de3a39df732ff6.tar.bz2 |
Kill off more cerr/cout uses and prune includes a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r-- | lib/Transforms/Instrumentation/BlockProfiling.cpp | 12 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/EdgeProfiling.cpp | 9 |
2 files changed, 8 insertions, 13 deletions
diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp index 029b8fe..eb8f225 100644 --- a/lib/Transforms/Instrumentation/BlockProfiling.cpp +++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp @@ -19,13 +19,11 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Constants.h" #include "llvm/DerivedTypes.h" -#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Support/Compiler.h" -#include "llvm/Support/Streams.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/Instrumentation.h" #include "RSProfiling.h" #include "ProfilingUtils.h" @@ -53,8 +51,8 @@ ModulePass *llvm::createFunctionProfilerPass() { bool FunctionProfiler::runOnModule(Module &M) { Function *Main = M.getFunction("main"); if (Main == 0) { - cerr << "WARNING: cannot insert function profiling into a module" - << " with no main function!\n"; + errs() << "WARNING: cannot insert function profiling into a module" + << " with no main function!\n"; return false; // No main, no instrumentation! } @@ -100,8 +98,8 @@ ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); } bool BlockProfiler::runOnModule(Module &M) { Function *Main = M.getFunction("main"); if (Main == 0) { - cerr << "WARNING: cannot insert block profiling into a module" - << " with no main function!\n"; + errs() << "WARNING: cannot insert block profiling into a module" + << " with no main function!\n"; return false; // No main, no instrumentation! } diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp index 2220bbf..ed9ff50 100644 --- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp @@ -18,13 +18,10 @@ //===----------------------------------------------------------------------===// #include "ProfilingUtils.h" -#include "llvm/Constants.h" -#include "llvm/DerivedTypes.h" -#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Support/Compiler.h" -#include "llvm/Support/Streams.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Instrumentation.h" #include <set> @@ -48,8 +45,8 @@ ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); } bool EdgeProfiler::runOnModule(Module &M) { Function *Main = M.getFunction("main"); if (Main == 0) { - cerr << "WARNING: cannot insert edge profiling into a module" - << " with no main function!\n"; + errs() << "WARNING: cannot insert edge profiling into a module" + << " with no main function!\n"; return false; // No main, no instrumentation! } |