diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-26 22:28:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-26 22:28:53 +0000 |
commit | a0f7ff334f86926356491ec78ab3066247dc93b1 (patch) | |
tree | 090735b51ca45075a15791563b2ee1b810ead6cf /lib/Analysis/Lint.cpp | |
parent | dcbab9cf5a23da7cfaf815609aa422c789d4996e (diff) | |
download | llvm-a0f7ff334f86926356491ec78ab3066247dc93b1.tar.gz llvm-a0f7ff334f86926356491ec78ab3066247dc93b1.tar.bz2 llvm-a0f7ff334f86926356491ec78ab3066247dc93b1.tar.xz |
Fix Lint printing warnings multiple times. Remove the ErrorStr
option from lintModule, which was an artifact from being
based on Verifier code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Lint.cpp')
-rw-r--r-- | lib/Analysis/Lint.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Analysis/Lint.cpp b/lib/Analysis/Lint.cpp index 1fae14f801..a031cbc65b 100644 --- a/lib/Analysis/Lint.cpp +++ b/lib/Analysis/Lint.cpp @@ -179,6 +179,7 @@ bool Lint::runOnFunction(Function &F) { TD = getAnalysisIfAvailable<TargetData>(); visit(F); dbgs() << MessagesStr.str(); + Messages.clear(); return false; } @@ -492,14 +493,10 @@ void llvm::lintFunction(const Function &f) { } /// lintModule - Check a module for errors, printing messages on stderr. -/// Return true if the module is corrupt. /// -void llvm::lintModule(const Module &M, std::string *ErrorInfo) { +void llvm::lintModule(const Module &M) { PassManager PM; Lint *V = new Lint(); PM.add(V); PM.run(const_cast<Module&>(M)); - - if (ErrorInfo) - *ErrorInfo = V->MessagesStr.str(); } |