Patch up omissions in DebugLoc propagation.
[oota-llvm.git] / lib / Target / Mips / MipsTargetAsmInfo.cpp
index 04edd0d4b537c8031f08910dbae4ab9e922f2a71..7566f41eaf62fd824a11fff543c74628d195a156 100644 (file)
@@ -30,18 +30,17 @@ MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM):
   PrivateGlobalPrefix         = "$";
   JumpTableDataSection        = "\t.rdata";
   CommentString               = "#";
-  ReadOnlySection             = "\t.rdata";
   ZeroDirective               = "\t.space\t";
   BSSSection                  = "\t.section\t.bss";
   CStringSection              = ".rodata.str";
-  FourByteConstantSection     = "\t.section\t.rodata.cst4,\"aM\",@progbits,4";
 
   if (!Subtarget->hasABICall()) {
     JumpTableDirective = "\t.word\t";
     SmallDataSection = getNamedSection("\t.sdata", SectionFlags::Writeable);
-    SmallBSSSection = getNamedSection("\t.sbss", SectionFlags::Writeable | 
+    SmallBSSSection = getNamedSection("\t.sbss",
+                                      SectionFlags::Writeable |
                                       SectionFlags::BSS);
-  } else 
+  } else
     JumpTableDirective = "\t.gpword\t";
 
 }
@@ -66,8 +65,8 @@ SectionKindForGlobal(const GlobalValue *GV) const {
     return K;
 
   if (isa<GlobalVariable>(GV)) {
-    const TargetData *TD = ETM->getTargetData();
-    unsigned Size = TD->getABITypeSize(GV->getType()->getElementType());
+    const TargetData *TD = TM.getTargetData();
+    unsigned Size = TD->getTypePaddedSize(GV->getType()->getElementType());
     unsigned Threshold = Subtarget->getSSectionThreshold();
 
     if (Size > 0 && Size <= Threshold) {
@@ -86,7 +85,7 @@ SelectSectionForGlobal(const GlobalValue *GV) const {
   SectionKind::Kind K = SectionKindForGlobal(GV);
   const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV);
 
-  if (GVA && (!GVA->isWeakForLinker()))
+  if (GVA && (!GVA->mayBeOverridden()))
     switch (K) {
       case SectionKind::SmallData:
         return getSmallDataSection();