[llvm-commits] [llvm] r55631 - /llvm/trunk/lib/VMCore/Verifier.cpp

Nuno Lopes nunoplopes at sapo.pt
Tue Sep 2 04:30:12 PDT 2008


Author: nlopes
Date: Tue Sep  2 06:30:10 2008
New Revision: 55631

URL: http://llvm.org/viewvc/llvm-project?rev=55631&view=rev
Log:
plug a little memleak in verifyFunction()
# first commit to llvm, so whatch out :)

Modified:
    llvm/trunk/lib/VMCore/Verifier.cpp

Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=55631&r1=55630&r2=55631&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Tue Sep  2 06:30:10 2008
@@ -1512,10 +1512,12 @@
   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;
 }
 





More information about the llvm-commits mailing list