[llvm-commits] [llvm] r49793 - /llvm/trunk/tools/llc/llc.cpp

Dan Gohman gohman at apple.com
Wed Apr 16 08:56:26 PDT 2008


Author: djg
Date: Wed Apr 16 10:56:26 2008
New Revision: 49793

URL: http://llvm.org/viewvc/llvm-project?rev=49793&view=rev
Log:
Fix a memory leak in llc.

Modified:
    llvm/trunk/tools/llc/llc.cpp

Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=49793&r1=49792&r2=49793&view=diff

==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Wed Apr 16 10:56:26 2008
@@ -246,7 +246,8 @@
     PM.run(mod);
   } else {
     // Build up all of the passes that we want to do to the module.
-    FunctionPassManager Passes(new ExistingModuleProvider(M.get()));
+    ExistingModuleProvider Provider(M.release());
+    FunctionPassManager Passes(&Provider);
     Passes.add(new TargetData(*Target.getTargetData()));
     
 #ifndef NDEBUG





More information about the llvm-commits mailing list