Fix lli with OrcLazyJIT: the default DataLayout was used.

Set the correct one using the TargetMachine instead.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243664 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mehdi Amini 2015-07-30 17:29:33 +00:00
parent ece90bb19e
commit 778e06475b

View File

@ -123,6 +123,7 @@ int llvm::runOrcLazyJIT(std::unique_ptr<Module> M, int ArgC, char* ArgV[]) {
EngineBuilder EB;
EB.setOptLevel(getOptLevel());
auto TM = std::unique_ptr<TargetMachine>(EB.selectTarget());
M->setDataLayout(TM->createDataLayout());
auto &Context = getGlobalContext();
auto CallbackMgrBuilder =
OrcLazyJIT::createCallbackManagerBuilder(Triple(TM->getTargetTriple()));