summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-09-02 11:30:10 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-09-02 11:30:10 +0000
commit99341f2d9d8cc9850412bbdb5e764d73bfd42d6e (patch)
tree7ea6c91a987e046149b8f83fa18121e0ed6ee19c /llvm/lib/VMCore/Verifier.cpp
parentd63db4063aaf4d2cf987e5bd9223486883a65ca9 (diff)
downloadbcm5719-llvm-99341f2d9d8cc9850412bbdb5e764d73bfd42d6e.tar.gz
bcm5719-llvm-99341f2d9d8cc9850412bbdb5e764d73bfd42d6e.zip
plug a little memleak in verifyFunction()
# first commit to llvm, so whatch out :) llvm-svn: 55631
Diffstat (limited to 'llvm/lib/VMCore/Verifier.cpp')
-rw-r--r--llvm/lib/VMCore/Verifier.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index 034a0628fba..5ca8e1a23a2 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/lib/VMCore/Verifier.cpp
@@ -1512,10 +1512,12 @@ bool llvm::verifyFunction(const Function &f, VerifierFailureAction action) {
Function &F = const_cast<Function&>(f);
assert(!F.isDeclaration() && "Cannot verify external functions");
- FunctionPassManager FPM(new ExistingModuleProvider(F.getParent()));
+ ExistingModuleProvider MP(F.getParent());
+ FunctionPassManager FPM(&MP);
Verifier *V = new Verifier(action);
FPM.add(V);
FPM.run(F);
+ MP.releaseModule();
return V->Broken;
}
OpenPOWER on IntegriCloud