diff options
| author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-09-02 11:30:10 +0000 | 
|---|---|---|
| committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-09-02 11:30:10 +0000 | 
| commit | 99341f2d9d8cc9850412bbdb5e764d73bfd42d6e (patch) | |
| tree | 7ea6c91a987e046149b8f83fa18121e0ed6ee19c /llvm/lib/VMCore/Verifier.cpp | |
| parent | d63db4063aaf4d2cf987e5bd9223486883a65ca9 (diff) | |
| download | bcm5719-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.cpp | 4 | 
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;  }  | 

