diff options
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp b/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp index 00b7ee74ca0..f110d00451e 100644 --- a/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp +++ b/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp @@ -202,6 +202,7 @@ JitFunction::JitFunction(JitFunctionContext &&Context, LLVMLinkInMCJIT(); uintptr_t CodeSize = 0; std::string Error; + llvm::LLVMTargetMachine *TM = FunctionContext.TM.release(); ExecEngine.reset( llvm::EngineBuilder(std::move(FunctionContext.Module)) .setErrorStr(&Error) @@ -209,7 +210,7 @@ JitFunction::JitFunction(JitFunctionContext &&Context, .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. |