mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +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:
@ -96,15 +96,16 @@ int main(int argc, char **argv) {
|
||||
LLVMContext Context;
|
||||
|
||||
// Create some module to put our function into it.
|
||||
std::unique_ptr<Module> M(new Module("test", Context));
|
||||
std::unique_ptr<Module> Owner(new Module("test", Context));
|
||||
Module *M = Owner.get();
|
||||
|
||||
// We are about to create the "fib" function:
|
||||
Function *FibF = CreateFibFunction(M.get(), Context);
|
||||
Function *FibF = CreateFibFunction(M, Context);
|
||||
|
||||
// Now we going to create JIT
|
||||
std::string errStr;
|
||||
ExecutionEngine *EE =
|
||||
EngineBuilder(M.get())
|
||||
EngineBuilder(std::move(Owner))
|
||||
.setErrorStr(&errStr)
|
||||
.setEngineKind(EngineKind::JIT)
|
||||
.create();
|
||||
|
Reference in New Issue
Block a user