From: Mehdi Amini Date: Thu, 30 Jul 2015 17:29:33 +0000 (+0000) Subject: Fix lli with OrcLazyJIT: the default DataLayout was used. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=778e06475bb6f1c7411e0a0cd7aaa67d44e9f8a6 Fix lli with OrcLazyJIT: the default DataLayout was used. Set the correct one using the TargetMachine instead. From: Mehdi Amini git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243664 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/lli/OrcLazyJIT.cpp b/tools/lli/OrcLazyJIT.cpp index 718b3903822..4ac2ccffcd5 100644 --- a/tools/lli/OrcLazyJIT.cpp +++ b/tools/lli/OrcLazyJIT.cpp @@ -123,6 +123,7 @@ int llvm::runOrcLazyJIT(std::unique_ptr M, int ArgC, char* ArgV[]) { EngineBuilder EB; EB.setOptLevel(getOptLevel()); auto TM = std::unique_ptr(EB.selectTarget()); + M->setDataLayout(TM->createDataLayout()); auto &Context = getGlobalContext(); auto CallbackMgrBuilder = OrcLazyJIT::createCallbackManagerBuilder(Triple(TM->getTargetTriple()));