mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-13 15:37:24 +00:00
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
This commit is contained in:
parent
dcbab9cf5a
commit
a0f7ff334f
@ -38,8 +38,7 @@ FunctionPass *createLintPass();
|
||||
/// 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.
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user