summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCSection.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-13 00:37:15 +0000
committerChris Lattner <sabre@nondot.org>2009-08-13 00:37:15 +0000
commit04b4700ebcec1f877cef4f87979b82f29969f3af (patch)
treec6e9db8e74eb56f944a7f4150d873a004ed8aa10 /llvm/lib/MC/MCSection.cpp
parent6bb66bbd0661028ee007cbe62c7045a166ab95d4 (diff)
downloadbcm5719-llvm-04b4700ebcec1f877cef4f87979b82f29969f3af.tar.gz
bcm5719-llvm-04b4700ebcec1f877cef4f87979b82f29969f3af.zip
sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF implementations.
MCContext no longer maintains a string -> section map. llvm-svn: 78874
Diffstat (limited to 'llvm/lib/MC/MCSection.cpp')
-rw-r--r--llvm/lib/MC/MCSection.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp
index f6ac5cc5cbd..8b7fcd2815c 100644
--- a/llvm/lib/MC/MCSection.cpp
+++ b/llvm/lib/MC/MCSection.cpp
@@ -27,16 +27,9 @@ MCSection::~MCSection() {
MCSectionELF *MCSectionELF::
Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) {
- return new (Ctx) MCSectionELF(Name, IsDirective, K, Ctx);
+ return new (Ctx) MCSectionELF(Name, IsDirective, K);
}
-MCSectionELF::MCSectionELF(const StringRef &name, bool isDirective,
- SectionKind K, MCContext &Ctx)
- : MCSection(K), Name(name), IsDirective(isDirective) {
- Ctx.SetSection(Name, this);
-}
-
-
void MCSectionELF::PrintSwitchToSection(const TargetAsmInfo &TAI,
raw_ostream &OS) const {
if (isDirective()) {
@@ -118,16 +111,9 @@ void MCSectionELF::PrintSwitchToSection(const TargetAsmInfo &TAI,
MCSectionCOFF *MCSectionCOFF::
Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) {
- return new (Ctx) MCSectionCOFF(Name, IsDirective, K, Ctx);
+ return new (Ctx) MCSectionCOFF(Name, IsDirective, K);
}
-MCSectionCOFF::MCSectionCOFF(const StringRef &name, bool isDirective,
- SectionKind K, MCContext &Ctx)
- : MCSection(K), Name(name), IsDirective(isDirective) {
- Ctx.SetSection(Name, this);
-}
-
-
void MCSectionCOFF::PrintSwitchToSection(const TargetAsmInfo &TAI,
raw_ostream &OS) const {
OpenPOWER on IntegriCloud