summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-13 13:44:11 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-13 13:44:11 +0000
commit156227ac2bcac239f9dfd0a8314b6efcae9021b0 (patch)
treebb4eebec59de726cdc11b2d63ed5d5e4879cdba7 /llvm
parentfa82ba91f943274c91801348ec78fa6c02767736 (diff)
downloadbcm5719-llvm-156227ac2bcac239f9dfd0a8314b6efcae9021b0.tar.gz
bcm5719-llvm-156227ac2bcac239f9dfd0a8314b6efcae9021b0.zip
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
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/IR/Verifier.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 4255cd2553b..1bb3e3423d4 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -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;
}
OpenPOWER on IntegriCloud