forked from OSchip/llvm-project
Fix lli with OrcLazyJIT: the default DataLayout was used.
Set the correct one using the TargetMachine instead. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243664
This commit is contained in:
parent
57d3f14502
commit
443024b919
|
@ -123,6 +123,7 @@ int llvm::runOrcLazyJIT(std::unique_ptr<Module> M, int ArgC, char* ArgV[]) {
|
||||||
EngineBuilder EB;
|
EngineBuilder EB;
|
||||||
EB.setOptLevel(getOptLevel());
|
EB.setOptLevel(getOptLevel());
|
||||||
auto TM = std::unique_ptr<TargetMachine>(EB.selectTarget());
|
auto TM = std::unique_ptr<TargetMachine>(EB.selectTarget());
|
||||||
|
M->setDataLayout(TM->createDataLayout());
|
||||||
auto &Context = getGlobalContext();
|
auto &Context = getGlobalContext();
|
||||||
auto CallbackMgrBuilder =
|
auto CallbackMgrBuilder =
|
||||||
OrcLazyJIT::createCallbackManagerBuilder(Triple(TM->getTargetTriple()));
|
OrcLazyJIT::createCallbackManagerBuilder(Triple(TM->getTargetTriple()));
|
||||||
|
|
Loading…
Reference in New Issue