From b57c9c4a6e81e16666f56c6b5e07e910abeeb212 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Thu, 27 Sep 2018 04:19:32 +0000 Subject: [PATCH] [ORC] Use ExecutionSession's pre-constructed main JITDylib in LLJIT. As of r342086 ExecutionSession automatically creates a 'main' JITDylib, so there is no need for LLJIT to create its own. llvm-svn: 343167 --- llvm/lib/ExecutionEngine/Orc/LLJIT.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp index 0a0faaa..fef190b 100644 --- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp +++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp @@ -83,7 +83,7 @@ Expected LLJIT::lookupLinkerMangled(JITDylib &JD, LLJIT::LLJIT(std::unique_ptr ES, std::unique_ptr TM, DataLayout DL) - : ES(std::move(ES)), Main(this->ES->createJITDylib("main")), + : ES(std::move(ES)), Main(this->ES->getMainJITDylib()), DL(std::move(DL)), ObjLinkingLayer(*this->ES, [this](VModuleKey K) { return getMemoryManager(K); }), @@ -93,7 +93,7 @@ LLJIT::LLJIT(std::unique_ptr ES, LLJIT::LLJIT(std::unique_ptr ES, JITTargetMachineBuilder JTMB, DataLayout DL, unsigned NumCompileThreads) - : ES(std::move(ES)), Main(this->ES->createJITDylib("main")), + : ES(std::move(ES)), Main(this->ES->getMainJITDylib()), DL(std::move(DL)), ObjLinkingLayer(*this->ES, [this](VModuleKey K) { return getMemoryManager(K); }), -- 2.7.4