untangle a TargetAsmInfo hack where ELFTargetAsmInfo would create a

'unnamed' bss section, but some impls would want a named one.  Since
they don't have consistent behavior, just make each target do their
own thing, instead of doing something "sortof common" then having
targets change immutable objects later.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77165 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-07-26 19:23:28 +00:00
parent 30b2bdfa73
commit 0fcf4dc6d3
16 changed files with 36 additions and 51 deletions

View File

@@ -50,13 +50,11 @@ PPCDarwinTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason,
}
const char *
PPCDarwinTargetAsmInfo::getEHGlobalPrefix() const
{
PPCDarwinTargetAsmInfo::getEHGlobalPrefix() const {
const PPCSubtarget* Subtarget = &TM.getSubtarget<PPCSubtarget>();
if (Subtarget->getDarwinVers() > 9)
return PrivateGlobalPrefix;
else
return "";
return "";
}
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
@@ -74,9 +72,8 @@ PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
BSSSection = "\t.section\t\".sbss\",\"aw\",@nobits";
// PPC/Linux normally uses named section for BSS.
BSSSection_ = getNamedSection("\t.bss",
SectionFlags::Writable | SectionFlags::BSS,
/* Override */ true);
BSSSection_ = getNamedSection("\t.bss",
SectionFlags::Writable | SectionFlags::BSS);
// Debug Information
AbsoluteDebugSectionOffsets = true;