summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/EdgeProfiling.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2013-02-08 21:48:29 +0000
committerBob Wilson <bob.wilson@apple.com>2013-02-08 21:48:29 +0000
commit58446916b71c4ff79962081ea7c4df078c388b0e (patch)
treebcdb044c5d6910123197f8a861ca0b11d33874a0 /lib/Transforms/Instrumentation/EdgeProfiling.cpp
parentb2d1275188c997e279293afc031a88e03871f9e0 (diff)
downloadllvm-58446916b71c4ff79962081ea7c4df078c388b0e.tar.gz
llvm-58446916b71c4ff79962081ea7c4df078c388b0e.tar.bz2
llvm-58446916b71c4ff79962081ea7c4df078c388b0e.tar.xz
Revert "Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>"
This reverts r171041. This was a nice idea that didn't work out well. Clang warnings need to be associated with warning groups so that they can be selectively disabled, promoted to errors, etc. This simplistic patch didn't allow for that. Enhancing it to provide some way for the backend to specify a front-end warning type seems like overkill for the few uses of this, at least for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/EdgeProfiling.cpp')
-rw-r--r--lib/Transforms/Instrumentation/EdgeProfiling.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
index 0b18b4ce64..a2459fbafe 100644
--- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp
+++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
@@ -21,7 +21,6 @@
#include "llvm/Transforms/Instrumentation.h"
#include "ProfilingUtils.h"
#include "llvm/ADT/Statistic.h"
-#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/raw_ostream.h"
@@ -55,8 +54,8 @@ ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); }
bool EdgeProfiler::runOnModule(Module &M) {
Function *Main = M.getFunction("main");
if (Main == 0) {
- M.getContext().emitWarning("cannot insert edge profiling into a module"
- " with no main function");
+ errs() << "WARNING: cannot insert edge profiling into a module"
+ << " with no main function!\n";
return false; // No main, no instrumentation!
}