summaryrefslogtreecommitdiff
path: root/tools/llc
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 /tools/llc
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 'tools/llc')
-rw-r--r--tools/llc/llc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index c51c012391b..e33cd795d3a 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -312,7 +312,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
PM.add(new TargetLibraryInfoWrapperPass(TLII));
// Add the target data from the target machine, if it exists, or the module.
- M->setDataLayout(Target->createDataLayout());
+ if (const DataLayout *DL = Target->getDataLayout())
+ M->setDataLayout(*DL);
// Override function attributes based on CPUStr, FeaturesStr, and command line
// flags.