mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Make it explicit that ExecutionEngine takes ownership of the modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215967 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -243,13 +243,14 @@ int main() {
|
||||
LLVMContext Context;
|
||||
|
||||
// Create some module to put our function into it.
|
||||
Module *M = new Module("test", Context);
|
||||
std::unique_ptr<Module> Owner = make_unique<Module>("test", Context);
|
||||
Module *M = Owner.get();
|
||||
|
||||
Function* add1F = createAdd1( M );
|
||||
Function* fibF = CreateFibFunction( M );
|
||||
|
||||
// Now we create the JIT.
|
||||
ExecutionEngine* EE = EngineBuilder(M).create();
|
||||
ExecutionEngine* EE = EngineBuilder(std::move(Owner)).create();
|
||||
|
||||
//~ std::cout << "We just constructed this LLVM module:\n\n" << *M;
|
||||
//~ std::cout << "\n\nRunning foo: " << std::flush;
|
||||
|
Reference in New Issue
Block a user