summaryrefslogtreecommitdiff
path: root/lib/MC/MCSectionELF.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-15 05:56:11 +0000
committerChris Lattner <sabre@nondot.org>2009-08-15 05:56:11 +0000
commit7d996d907f593d9d1a4c9d79805b2b7adee63f24 (patch)
treefcdc9ee08f11e76b5ebb8b5c522a305dd9f84625 /lib/MC/MCSectionELF.cpp
parentbd51c677390d8e13560cbf3ea972b95a5fbc1f9a (diff)
downloadllvm-7d996d907f593d9d1a4c9d79805b2b7adee63f24.tar.gz
llvm-7d996d907f593d9d1a4c9d79805b2b7adee63f24.tar.bz2
llvm-7d996d907f593d9d1a4c9d79805b2b7adee63f24.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCSectionELF.cpp')
-rw-r--r--lib/MC/MCSectionELF.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp
index 3d8774ceeb..fe0fcb3a06 100644
--- a/lib/MC/MCSectionELF.cpp
+++ b/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)) {