summaryrefslogtreecommitdiff
path: root/lib/LTO/LTOModule.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2015-07-24 03:36:55 +0000
committerMehdi Amini <mehdi.amini@apple.com>2015-07-24 03:36:55 +0000
commit26be2142324893e254ec9ba91da3a54694936498 (patch)
tree512093eecbc7e8cc035495cb4a249b3ef2941d5b /lib/LTO/LTOModule.cpp
parent90908cb34d73460d3aa83e2194a58d82c6d1f199 (diff)
Revert "Remove access to the DataLayout in the TargetMachine"
This reverts commit 0f720d984f419c747709462f7476dff962c0bc41. It breaks clang too badly, I need to prepare a proper patch for clang first. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243089 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LTO/LTOModule.cpp')
-rw-r--r--lib/LTO/LTOModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp
index ec8991ed236..53ed4175f8e 100644
--- a/lib/LTO/LTOModule.cpp
+++ b/lib/LTO/LTOModule.cpp
@@ -232,7 +232,7 @@ LTOModule *LTOModule::makeLTOModule(MemoryBufferRef Buffer,
TargetMachine *target = march->createTargetMachine(TripleStr, CPU, FeatureStr,
options);
- M->setDataLayout(target->createDataLayout());
+ M->setDataLayout(*target->getDataLayout());
std::unique_ptr<object::IRObjectFile> IRObj(
new object::IRObjectFile(Buffer, std::move(M)));