OSDN Git Service

We already have a reference to the TargetMachine, use that.
authorEric Christopher <echristo@gmail.com>
Tue, 10 Jun 2014 20:39:39 +0000 (20:39 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 10 Jun 2014 20:39:39 +0000 (20:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210580 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GlobalMerge.cpp

index dd9c378..16f2099 100644 (file)
@@ -270,8 +270,7 @@ bool GlobalMerge::doInitialization(Module &M) {
       continue;
 
     if (DL->getTypeAllocSize(Ty) < MaxOffset) {
-      if (TargetLoweringObjectFile::getKindForGlobal(I, TLI->getTargetMachine())
-          .isBSSLocal())
+      if (TargetLoweringObjectFile::getKindForGlobal(I, *TM).isBSSLocal())
         BSSGlobals[AddressSpace].push_back(I);
       else if (I->isConstant())
         ConstGlobals[AddressSpace].push_back(I);