summaryrefslogtreecommitdiff
path: root/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
commit38cff389af1d78bd80df0479ef258493e0c5897e (patch)
tree7bbbecb058efb77eaf4ab59aac1f6c8a8e168e72 /lib/MC/MCSection.cpp
parentf991ecf7231436437f6de1a22e93d0a1b380e078 (diff)
downloadllvm-38cff389af1d78bd80df0479ef258493e0c5897e.tar.gz
llvm-38cff389af1d78bd80df0479ef258493e0c5897e.tar.bz2
llvm-38cff389af1d78bd80df0479ef258493e0c5897e.tar.xz
sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF implementations.
MCContext no longer maintains a string -> section map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCSection.cpp')
-rw-r--r--lib/MC/MCSection.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/MC/MCSection.cpp b/lib/MC/MCSection.cpp
index f6ac5cc5cb..8b7fcd2815 100644
--- a/lib/MC/MCSection.cpp
+++ b/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 {