All MCSections are now required to have a SectionKind.
[oota-llvm.git] / lib / MC / MCSection.cpp
index 2a2b0b6fafad9d07e6dc45a41e1008d923c69dc9..006546febb13a200047d6fb36c261eeecb5fe582 100644 (file)
@@ -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);
-}