diff options
author | Eric Christopher <echristo@gmail.com> | 2015-02-20 20:56:39 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-02-20 20:56:39 +0000 |
commit | 84af8beaeec915102a77387962dd95c4ae076bee (patch) | |
tree | e0fc764a4f12223708c1334f9b7f353410faad95 /lib/CodeGen/GlobalMerge.cpp | |
parent | d889ad2ab88b261da491bc6b0a3d79493a25f50a (diff) |
Grab the DataLayout off of the TargetMachine since that's where
it's stored.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/GlobalMerge.cpp')
-rw-r--r-- | lib/CodeGen/GlobalMerge.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/GlobalMerge.cpp b/lib/CodeGen/GlobalMerge.cpp index 82575671e68..6da9766379e 100644 --- a/lib/CodeGen/GlobalMerge.cpp +++ b/lib/CodeGen/GlobalMerge.cpp @@ -144,7 +144,7 @@ INITIALIZE_TM_PASS(GlobalMerge, "global-merge", "Merge global variables", bool GlobalMerge::doMerge(SmallVectorImpl<GlobalVariable*> &Globals, Module &M, bool isConst, unsigned AddrSpace) const { const TargetLowering *TLI = TM->getSubtargetImpl()->getTargetLowering(); - const DataLayout *DL = TLI->getDataLayout(); + const DataLayout *DL = TM->getDataLayout(); // FIXME: Infer the maximum possible offset depending on the actual users // (these max offsets are different for the users inside Thumb or ARM @@ -283,7 +283,7 @@ bool GlobalMerge::doInitialization(Module &M) { DenseMap<unsigned, SmallVector<GlobalVariable*, 16> > Globals, ConstGlobals, BSSGlobals; const TargetLowering *TLI = TM->getSubtargetImpl()->getTargetLowering(); - const DataLayout *DL = TLI->getDataLayout(); + const DataLayout *DL = TM->getDataLayout(); unsigned MaxOffset = TLI->getMaximalGlobalOffset(); bool Changed = false; setMustKeepGlobalVariables(M); |