summaryrefslogtreecommitdiff
path: root/lib/Analysis
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/Analysis
parentb2d1275188c997e279293afc031a88e03871f9e0 (diff)
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/Analysis')
-rw-r--r--lib/Analysis/ProfileDataLoaderPass.cpp4
-rw-r--r--lib/Analysis/ProfileInfoLoaderPass.cpp17
2 files changed, 10 insertions, 11 deletions
diff --git a/lib/Analysis/ProfileDataLoaderPass.cpp b/lib/Analysis/ProfileDataLoaderPass.cpp
index 51b7f1d8691..2ee0093a8f5 100644
--- a/lib/Analysis/ProfileDataLoaderPass.cpp
+++ b/lib/Analysis/ProfileDataLoaderPass.cpp
@@ -177,8 +177,8 @@ bool ProfileMetadataLoaderPass::runOnModule(Module &M) {
unsigned ReadCount = matchEdges(M, PB, Counters);
if (ReadCount != Counters.size()) {
- M.getContext().emitWarning("profile information is inconsistent "
- "with the current program");
+ errs() << "WARNING: profile information is inconsistent with "
+ << "the current program!\n";
}
NumEdgesRead = ReadCount;
diff --git a/lib/Analysis/ProfileInfoLoaderPass.cpp b/lib/Analysis/ProfileInfoLoaderPass.cpp
index 094c107c0a4..346f8d6d625 100644
--- a/lib/Analysis/ProfileInfoLoaderPass.cpp
+++ b/lib/Analysis/ProfileInfoLoaderPass.cpp
@@ -19,7 +19,6 @@
#include "llvm/Analysis/ProfileInfoLoader.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/InstrTypes.h"
-#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/CFG.h"
@@ -171,8 +170,8 @@ bool LoaderPass::runOnModule(Module &M) {
}
}
if (ReadCount != Counters.size()) {
- M.getContext().emitWarning("profile information is inconsistent "
- "with the current program");
+ errs() << "WARNING: profile information is inconsistent with "
+ << "the current program!\n";
}
NumEdgesRead = ReadCount;
}
@@ -219,8 +218,8 @@ bool LoaderPass::runOnModule(Module &M) {
}
}
if (ReadCount != Counters.size()) {
- M.getContext().emitWarning("profile information is inconsistent "
- "with the current program");
+ errs() << "WARNING: profile information is inconsistent with "
+ << "the current program!\n";
}
NumEdgesRead = ReadCount;
}
@@ -240,8 +239,8 @@ bool LoaderPass::runOnModule(Module &M) {
BlockInformation[F][BB] = (double)Counters[ReadCount++];
}
if (ReadCount != Counters.size()) {
- M.getContext().emitWarning("profile information is inconsistent "
- "with the current program");
+ errs() << "WARNING: profile information is inconsistent with "
+ << "the current program!\n";
}
}
@@ -259,8 +258,8 @@ bool LoaderPass::runOnModule(Module &M) {
FunctionInformation[F] = (double)Counters[ReadCount++];
}
if (ReadCount != Counters.size()) {
- M.getContext().emitWarning("profile information is inconsistent "
- "with the current program");
+ errs() << "WARNING: profile information is inconsistent with "
+ << "the current program!\n";
}
}