Has been useful while trying to get around all the error reporting issues mentioned on PR37049.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330255
91177308-0d34-0410-b5e6-
96231b3b80d8
LLVMLinkInMCJIT();
uintptr_t CodeSize = 0;
std::string Error;
+ llvm::LLVMTargetMachine *TM = FunctionContext.TM.release();
ExecEngine.reset(
llvm::EngineBuilder(std::move(FunctionContext.Module))
.setErrorStr(&Error)
.setEngineKind(llvm::EngineKind::JIT)
.setMCJITMemoryManager(
llvm::make_unique<TrackingSectionMemoryManager>(&CodeSize))
- .create(FunctionContext.TM.release()));
+ .create(TM));
if (!ExecEngine)
llvm::report_fatal_error(Error);
// Adding the generated object file containing the assembled function.