Eliminate object-relinking support from CMake. Fixes PR 4429 and
[oota-llvm.git] / lib / Target / Mips / MipsTargetAsmInfo.cpp
index 7566f41eaf62fd824a11fff543c74628d195a156..c197b0c2981cce105fffc91bb6eacbc0882cdaa8 100644 (file)
@@ -66,7 +66,7 @@ SectionKindForGlobal(const GlobalValue *GV) const {
 
   if (isa<GlobalVariable>(GV)) {
     const TargetData *TD = TM.getTargetData();
-    unsigned Size = TD->getTypePaddedSize(GV->getType()->getElementType());
+    unsigned Size = TD->getTypeAllocSize(GV->getType()->getElementType());
     unsigned Threshold = Subtarget->getSSectionThreshold();
 
     if (Size > 0 && Size <= Threshold) {
@@ -85,7 +85,7 @@ SelectSectionForGlobal(const GlobalValue *GV) const {
   SectionKind::Kind K = SectionKindForGlobal(GV);
   const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV);
 
-  if (GVA && (!GVA->mayBeOverridden()))
+  if (GVA && (!GVA->isWeakForLinker()))
     switch (K) {
       case SectionKind::SmallData:
         return getSmallDataSection();