diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-15 05:56:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-15 05:56:11 +0000 |
commit | 0fbe0f51a4a3ccc8ca817d4fd6af4df7b85204cf (patch) | |
tree | 5b0fb6b5e8a22a615dc290aa8e9b0e547af5989e /llvm/lib/MC/MCSectionELF.cpp | |
parent | 2be79b3608cd0b2a0d10c3bf9a3e0c92b9fa700d (diff) | |
download | bcm5719-llvm-0fbe0f51a4a3ccc8ca817d4fd6af4df7b85204cf.tar.gz bcm5719-llvm-0fbe0f51a4a3ccc8ca817d4fd6af4df7b85204cf.zip |
add support for target-specific ELF section flags, add a new MCSectionXCore
class which represents the XCore cp/dp section flags. No functionality
change yet.
llvm-svn: 79077
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r-- | llvm/lib/MC/MCSectionELF.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp index 3d8774ceeb2..fe0fcb3a064 100644 --- a/llvm/lib/MC/MCSectionELF.cpp +++ b/llvm/lib/MC/MCSectionELF.cpp @@ -17,8 +17,7 @@ using namespace llvm; MCSectionELF *MCSectionELF:: Create(const StringRef &Section, unsigned Type, unsigned Flags, SectionKind K, bool isExplicit, MCContext &Ctx) { - return new - (Ctx) MCSectionELF(Section, Type, Flags, K, isExplicit); + return new (Ctx) MCSectionELF(Section, Type, Flags, K, isExplicit); } // ShouldOmitSectionDirective - Decides whether a '.section' directive @@ -68,7 +67,6 @@ void MCSectionELF::PrintSwitchToSection(const TargetAsmInfo &TAI, OS << ",#tls"; } else { OS << ",\""; - if (Flags & MCSectionELF::SHF_ALLOC) OS << 'a'; if (Flags & MCSectionELF::SHF_EXECINSTR) @@ -81,7 +79,11 @@ void MCSectionELF::PrintSwitchToSection(const TargetAsmInfo &TAI, OS << 'S'; if (Flags & MCSectionELF::SHF_TLS) OS << 'T'; - + + // If there are target-specific flags, print them. + if (Flags & ~MCSectionELF::TARGET_INDEP_SHF) + PrintTargetSpecificSectionFlags(TAI, OS); + OS << '"'; if (ShouldPrintSectionType(Type)) { |