[llvm] r194574 - Don't call doFinalization from verifyFunction.
Rafael Espindola
rafael.espindola at gmail.com
Wed Nov 13 05:44:11 PST 2013
Author: rafael
Date: Wed Nov 13 07:44:11 2013
New Revision: 194574
URL: http://llvm.org/viewvc/llvm-project?rev=194574&view=rev
Log:
Don't call doFinalization from verifyFunction.
verifyFunction needs to call doInitialization to collect metadata and avoid
crashing when verifying debug info in a function.
But it should not call doFinalization since that is where the verifier will
check declarations, variables and aliases, which is not desirable when one
only wants to verify a function.
A possible cleanup would be to split the class into a ModuleVerifier and
FunctionVerifier.
Issue reported by Ilia Filippov. Patch by Michael Kruse.
Modified:
llvm/trunk/lib/IR/Verifier.cpp
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=194574&r1=194573&r2=194574&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Wed Nov 13 07:44:11 2013
@@ -2402,7 +2402,6 @@ bool llvm::verifyFunction(const Function
FPM.add(V);
FPM.doInitialization();
FPM.run(F);
- FPM.doFinalization();
return V->Broken;
}
More information about the llvm-commits
mailing list