diff options
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/lli/OrcLazyJIT.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/lli/OrcLazyJIT.h | 3 | ||||
-rw-r--r-- | llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp | 7 |
3 files changed, 7 insertions, 5 deletions
diff --git a/llvm/tools/lli/OrcLazyJIT.cpp b/llvm/tools/lli/OrcLazyJIT.cpp index 4a8d3b9e3ed..d17672c1445 100644 --- a/llvm/tools/lli/OrcLazyJIT.cpp +++ b/llvm/tools/lli/OrcLazyJIT.cpp @@ -23,7 +23,7 @@ OrcLazyJIT::createCallbackMgr(Triple T, LLVMContext &Context) { case Triple::x86_64: { typedef orc::JITCompileCallbackManager<CompileLayerT, orc::OrcX86_64> CCMgrT; - return make_unique<CCMgrT>(CompileLayer, Context, 0, 64); + return make_unique<CCMgrT>(CompileLayer, CCMgrMemMgr, Context, 0, 64); } } } diff --git a/llvm/tools/lli/OrcLazyJIT.h b/llvm/tools/lli/OrcLazyJIT.h index 76e1ac63bd2..fc1d0827cbc 100644 --- a/llvm/tools/lli/OrcLazyJIT.h +++ b/llvm/tools/lli/OrcLazyJIT.h @@ -39,7 +39,7 @@ public: OrcLazyJIT(std::unique_ptr<TargetMachine> TM, LLVMContext &Context) : Error(false), TM(std::move(TM)), Mang(this->TM->getDataLayout()), - ObjectLayer([](){ return llvm::make_unique<SectionMemoryManager>(); }), + ObjectLayer(), CompileLayer(ObjectLayer, orc::SimpleCompiler(*this->TM)), LazyEmitLayer(CompileLayer), CCMgr(createCallbackMgr(Triple(this->TM->getTargetTriple()), Context)), @@ -82,6 +82,7 @@ private: bool Error; std::unique_ptr<TargetMachine> TM; Mangler Mang; + SectionMemoryManager CCMgrMemMgr; ObjLayerT ObjectLayer; CompileLayerT CompileLayer; diff --git a/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp b/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp index 946201521ba..c2c3498c9b8 100644 --- a/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp +++ b/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp @@ -13,6 +13,7 @@ #include "llvm/ADT/StringMap.h" #include "llvm/DebugInfo/DWARF/DIContext.h" +#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" #include "llvm/ExecutionEngine/RuntimeDyldChecker.h" #include "llvm/MC/MCAsmInfo.h" @@ -196,7 +197,7 @@ static int printLineInfoForInput() { for(unsigned i = 0, e = InputFileList.size(); i != e; ++i) { // Instantiate a dynamic linker. TrivialMemoryManager MemMgr; - RuntimeDyld Dyld(&MemMgr); + RuntimeDyld Dyld(MemMgr, MemMgr); // Load the input memory buffer. @@ -264,7 +265,7 @@ static int executeInput() { // Instantiate a dynamic linker. TrivialMemoryManager MemMgr; - RuntimeDyld Dyld(&MemMgr); + RuntimeDyld Dyld(MemMgr, MemMgr); // If we don't have any input files, read from stdin. if (!InputFileList.size()) @@ -513,7 +514,7 @@ static int linkAndVerify() { // Instantiate a dynamic linker. TrivialMemoryManager MemMgr; - RuntimeDyld Dyld(&MemMgr); + RuntimeDyld Dyld(MemMgr, MemMgr); Dyld.setProcessAllSections(true); RuntimeDyldChecker Checker(Dyld, Disassembler.get(), InstPrinter.get(), llvm::dbgs()); |