forked from OSchip/llvm-project
Fixed double free in Kaleidoscope. Fixes PR4762.
llvm-svn: 79896
This commit is contained in:
parent
dca19591f2
commit
e56676a3cc
llvm/examples/Kaleidoscope
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue