[llvm-commits] [llvm] r79896 - /llvm/trunk/examples/Kaleidoscope/toy.cpp

Reid Kleckner reid at kleckner.net
Sun Aug 23 22:42:22 PDT 2009


Author: rnk
Date: Mon Aug 24 00:42:21 2009
New Revision: 79896

URL: http://llvm.org/viewvc/llvm-project?rev=79896&view=rev
Log:
Fixed double free in Kaleidoscope.  Fixes PR4762.

Modified:
    llvm/trunk/examples/Kaleidoscope/toy.cpp

Modified: llvm/trunk/examples/Kaleidoscope/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/toy.cpp?rev=79896&r1=79895&r2=79896&view=diff

==============================================================================
--- llvm/trunk/examples/Kaleidoscope/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/toy.cpp Mon Aug 24 00:42:21 2009
@@ -1107,12 +1107,13 @@
 
   // Make the module, which holds all the code.
   TheModule = new Module("my cool jit", Context);
-  
-  // Create the JIT.
-  TheExecutionEngine = EngineBuilder(TheModule).create();
 
   {
     ExistingModuleProvider OurModuleProvider(TheModule);
+
+    // Create the JIT.
+    TheExecutionEngine = EngineBuilder(&OurModuleProvider).create();
+
     FunctionPassManager OurFPM(&OurModuleProvider);
       
     // Set up the optimizer pipeline.  Start with registering info about how the





More information about the llvm-commits mailing list