forked from OSchip/llvm-project
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. llvm-svn: 194574
This commit is contained in:
parent
fa82ba91f9
commit
156227ac2b
|
@ -2402,7 +2402,6 @@ bool llvm::verifyFunction(const Function &f, VerifierFailureAction action) {
|
|||
FPM.add(V);
|
||||
FPM.doInitialization();
|
||||
FPM.run(F);
|
||||
FPM.doFinalization();
|
||||
return V->Broken;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue