summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/GlobalMerge.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-02-20 20:56:39 +0000
committerEric Christopher <echristo@gmail.com>2015-02-20 20:56:39 +0000
commit9ecaa174d69bc22dc9a5896457915e0518fe9abc (patch)
tree1ce13306746dc6e54e198ce8df2e2b42b2095891 /llvm/lib/CodeGen/GlobalMerge.cpp
parent911d5b3ace39c8351042bdc211e9ec59f5c08b7f (diff)
downloadbcm5719-llvm-9ecaa174d69bc22dc9a5896457915e0518fe9abc.tar.gz
bcm5719-llvm-9ecaa174d69bc22dc9a5896457915e0518fe9abc.zip
Grab the DataLayout off of the TargetMachine since that's where
it's stored. llvm-svn: 230059
Diffstat (limited to 'llvm/lib/CodeGen/GlobalMerge.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalMerge.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/GlobalMerge.cpp b/llvm/lib/CodeGen/GlobalMerge.cpp
index 82575671e68..6da9766379e 100644
--- a/llvm/lib/CodeGen/GlobalMerge.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud