diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-21 21:26:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-21 21:26:32 +0000 |
commit | 42b6418cc0ed26123a7b838182d41aa940481c04 (patch) | |
tree | 88fa05a452446c1671fed735c97432d5a25d05fd /lib/Target/XCore/XCoreTargetAsmInfo.cpp | |
parent | 3380d5c4aaafc3d78d32f583d685d64a67ae5224 (diff) |
Remove some overridden functions in XCoreTargetAsmInfo that are
implemented exactly the same way as its ELFTargetAsmInfo subclass
has them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreTargetAsmInfo.cpp')
-rw-r--r-- | lib/Target/XCore/XCoreTargetAsmInfo.cpp | 63 |
1 files changed, 2 insertions, 61 deletions
diff --git a/lib/Target/XCore/XCoreTargetAsmInfo.cpp b/lib/Target/XCore/XCoreTargetAsmInfo.cpp index 59ad624052..3d2203d6bb 100644 --- a/lib/Target/XCore/XCoreTargetAsmInfo.cpp +++ b/lib/Target/XCore/XCoreTargetAsmInfo.cpp @@ -72,12 +72,9 @@ const Section* XCoreTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { SectionKind::Kind Kind = SectionKindForGlobal(GV); - if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) - { + if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) { if (!GVar->isWeakForLinker()) { switch (Kind) { - case SectionKind::RODataMergeStr: - return MergeableStringSection(GVar); case SectionKind::RODataMergeConst: return getReadOnlySection(); case SectionKind::ThreadData: @@ -93,17 +90,6 @@ XCoreTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { } const Section* -XCoreTargetAsmInfo::SelectSectionForMachineConst(const Type *Ty) const { - return MergeableConstSection(Ty); -} - -const Section* -XCoreTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const { - Constant *C = GV->getInitializer(); - return MergeableConstSection(C->getType()); -} - -inline const Section* XCoreTargetAsmInfo::MergeableConstSection(const Type *Ty) const { const TargetData *TD = TM.getTargetData(); @@ -120,15 +106,8 @@ XCoreTargetAsmInfo::MergeableConstSection(const Type *Ty) const { return getReadOnlySection(); } -const Section* XCoreTargetAsmInfo:: -MergeableStringSection(const GlobalVariable *GV) const { - // FIXME insert in correct mergable section - return getReadOnlySection(); -} - unsigned XCoreTargetAsmInfo:: -SectionFlagsForGlobal(const GlobalValue *GV, - const char* Name) const { +SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const { unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name); // Mask out unsupported flags Flags &= ~(SectionFlags::Small | SectionFlags::TLS); @@ -162,41 +141,3 @@ SectionFlagsForGlobal(const GlobalValue *GV, return Flags; } - -std::string XCoreTargetAsmInfo:: -printSectionFlags(unsigned flags) const { - std::string Flags = ",\""; - - if (!(flags & SectionFlags::Debug)) - Flags += 'a'; - if (flags & SectionFlags::Code) - Flags += 'x'; - if (flags & SectionFlags::Writeable) - Flags += 'w'; - if (flags & SectionFlags::Mergeable) - Flags += 'M'; - if (flags & SectionFlags::Strings) - Flags += 'S'; - if (flags & SectionFlags::TLS) - Flags += 'T'; - if (flags & SectionFlags::Small) { - if (flags & SectionFlags::Writeable) - Flags += 'd'; // DP relative - else - Flags += 'c'; // CP relative - } - - Flags += "\","; - - Flags += '@'; - - if (flags & SectionFlags::BSS) - Flags += "nobits"; - else - Flags += "progbits"; - - if (unsigned entitySize = SectionFlags::getEntitySize(flags)) - Flags += "," + utostr(entitySize); - - return Flags; -} |