Eliminate object-relinking support from CMake. Fixes PR 4429 and
[oota-llvm.git] / lib / Target / Mips / MipsTargetAsmInfo.cpp
index 900a1bd04a95ed9d33a09d793fe430ee62e0f37c..c197b0c2981cce105fffc91bb6eacbc0882cdaa8 100644 (file)
@@ -66,7 +66,7 @@ SectionKindForGlobal(const GlobalValue *GV) const {
 
   if (isa<GlobalVariable>(GV)) {
     const TargetData *TD = TM.getTargetData();
-    unsigned Size = TD->getABITypeSize(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();