[llvm-commits] [llvm] r104765 - in /llvm/trunk: include/llvm/Analysis/Lint.h lib/Analysis/Lint.cpp
Dan Gohman
gohman at apple.com
Wed May 26 15:28:53 PDT 2010
Author: djg
Date: Wed May 26 17:28:53 2010
New Revision: 104765
URL: http://llvm.org/viewvc/llvm-project?rev=104765&view=rev
Log:
Fix Lint printing warnings multiple times. Remove the ErrorStr
option from lintModule, which was an artifact from being
based on Verifier code.
Modified:
llvm/trunk/include/llvm/Analysis/Lint.h
llvm/trunk/lib/Analysis/Lint.cpp
Modified: llvm/trunk/include/llvm/Analysis/Lint.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Lint.h?rev=104765&r1=104764&r2=104765&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/Lint.h (original)
+++ llvm/trunk/include/llvm/Analysis/Lint.h Wed May 26 17:28:53 2010
@@ -38,8 +38,7 @@
/// This should only be used for debugging, because it plays games with
/// PassManagers and stuff.
void lintModule(
- const Module &M, ///< The module to be checked
- std::string *ErrorInfo = 0 ///< Information about failures.
+ const Module &M ///< The module to be checked
);
// lintFunction - Check a function.
Modified: llvm/trunk/lib/Analysis/Lint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Lint.cpp?rev=104765&r1=104764&r2=104765&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/Lint.cpp (original)
+++ llvm/trunk/lib/Analysis/Lint.cpp Wed May 26 17:28:53 2010
@@ -179,6 +179,7 @@
TD = getAnalysisIfAvailable<TargetData>();
visit(F);
dbgs() << MessagesStr.str();
+ Messages.clear();
return false;
}
@@ -492,14 +493,10 @@
}
/// 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();
}
More information about the llvm-commits
mailing list