summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2015-07-30 17:29:33 +0000
committerMehdi Amini <mehdi.amini@apple.com>2015-07-30 17:29:33 +0000
commit443024b919d27d56bcc4792d8e3de6e824af6b1f (patch)
treeeb464e0ccebb8ae12a4be4e7b78f51ee7913eb79
parent57d3f145025c4ad6f946d64a3a05f93ffb5fb405 (diff)
downloadbcm5719-llvm-443024b919d27d56bcc4792d8e3de6e824af6b1f.tar.gz
bcm5719-llvm-443024b919d27d56bcc4792d8e3de6e824af6b1f.zip
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
-rw-r--r--llvm/tools/lli/OrcLazyJIT.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/tools/lli/OrcLazyJIT.cpp b/llvm/tools/lli/OrcLazyJIT.cpp
index 718b3903822..4ac2ccffcd5 100644
--- a/llvm/tools/lli/OrcLazyJIT.cpp
+++ b/llvm/tools/lli/OrcLazyJIT.cpp
@@ -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()));
OpenPOWER on IntegriCloud