diff options
author | Reid Kleckner <reid@kleckner.net> | 2009-08-24 05:42:21 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2009-08-24 05:42:21 +0000 |
commit | 5d2ba37558421b75bc667f4a761c47406407966c (patch) | |
tree | 20ed0d592f6c84438a0271f41d47b20d132115ee /examples | |
parent | 7787fe2cbe875e938020252bdbbd35e6952a9099 (diff) | |
download | external_llvm-5d2ba37558421b75bc667f4a761c47406407966c.zip external_llvm-5d2ba37558421b75bc667f4a761c47406407966c.tar.gz external_llvm-5d2ba37558421b75bc667f4a761c47406407966c.tar.bz2 |
Fixed double free in Kaleidoscope. Fixes PR4762.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79896 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Kaleidoscope/toy.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/Kaleidoscope/toy.cpp b/examples/Kaleidoscope/toy.cpp index 3c1ce8b..6b0560a 100644 --- a/examples/Kaleidoscope/toy.cpp +++ b/examples/Kaleidoscope/toy.cpp @@ -1107,12 +1107,13 @@ int main() { // 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 |