don't mask out the small flag and then reapply it later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76666 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-07-21 22:39:28 +00:00
parent 27391795ac
commit 1ab78b03e8

View File

@ -71,31 +71,17 @@ XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM)
unsigned XCoreTargetAsmInfo::
SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const {
unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name);
// Mask out unsupported flags
Flags &= ~SectionFlags::Small;
// Set CP / DP relative flags
if (GV) {
SectionKind::Kind Kind = SectionKindForGlobal(GV);
switch (Kind) {
case SectionKind::ThreadData:
case SectionKind::ThreadBSS:
case SectionKind::Data:
case SectionKind::BSS:
case SectionKind::SmallData:
case SectionKind::SmallBSS:
Flags |= SectionFlags::Small;
break;
case SectionKind::ROData:
case SectionKind::RODataMergeStr:
case SectionKind::SmallROData:
if (Subtarget->isXS1A()) {
if (Subtarget->isXS1A())
Flags |= SectionFlags::Writeable;
}
Flags |=SectionFlags::Small;
break;
case SectionKind::RODataMergeConst:
Flags |=SectionFlags::Small;
default:
break;
}