[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
This commit is contained in:
Lang Hames 2018-09-27 04:19:32 +00:00
parent 8b9540379e
commit b57c9c4a6e
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ Expected<JITEvaluatedSymbol> LLJIT::lookupLinkerMangled(JITDylib &JD,
LLJIT::LLJIT(std::unique_ptr<ExecutionSession> ES,
std::unique_ptr<TargetMachine> 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<ExecutionSession> ES,
LLJIT::LLJIT(std::unique_ptr<ExecutionSession> 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); }),