[llvm-commits] [llvm] r79896 - /llvm/trunk/examples/Kaleidoscope/toy.cpp
Chris Lattner
clattner at apple.com
Mon Aug 24 10:20:31 PDT 2009
On Aug 23, 2009, at 10:42 PM, Reid Kleckner wrote:
> 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();
Hi Reid,
Are you sure that this will fix it? IT seems that we'd need something
like:
> ExistingModuleProvider *OurModuleProvider = new
> ExistingModuleProvider(TheModule);
> TheExecutionEngine = EngineBuilder(OurModuleProvider).create();
-Chris
> +
> FunctionPassManager OurFPM(&OurModuleProvider);
>
> // Set up the optimizer pipeline. Start with registering info
> about how the
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list