summaryrefslogtreecommitdiff
path: root/lib/MC/MCSection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCSection.cpp')
-rw-r--r--lib/MC/MCSection.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/MC/MCSection.cpp b/lib/MC/MCSection.cpp
index 2a2b0b6faf..006546febb 100644
--- a/lib/MC/MCSection.cpp
+++ b/lib/MC/MCSection.cpp
@@ -14,18 +14,15 @@ using namespace llvm;
MCSection::~MCSection() {
}
-MCSection::MCSection(const StringRef &N, MCContext &Ctx) : Name(N) {
+MCSection::MCSection(const StringRef &N, SectionKind K, MCContext &Ctx)
+ : Name(N), Kind(K) {
MCSection *&Entry = Ctx.Sections[Name];
assert(Entry == 0 && "Multiple sections with the same name created");
Entry = this;
}
-MCSection *MCSection::Create(const StringRef &Name, MCContext &Ctx) {
- return new (Ctx) MCSection(Name, Ctx);
+MCSection *MCSection::Create(const StringRef &Name, SectionKind K,
+ MCContext &Ctx) {
+ return new (Ctx) MCSection(Name, K, Ctx);
}
-
-MCSectionWithKind *
-MCSectionWithKind::Create(const StringRef &Name, SectionKind K, MCContext &Ctx){
- return new (Ctx) MCSectionWithKind(Name, K, Ctx);
-}