Remove yet another method of creating begin and end symbol for sections.
[oota-llvm.git] / include / llvm / MC / MCSection.h
index ab8968ef2baf0a4e6918b6d2a25f253fb38bccb0..55270a5f9ef2e3eafd506f128a690306c6c08b08 100644 (file)
@@ -35,7 +35,7 @@ private:
   MCSection(const MCSection &) = delete;
   void operator=(const MCSection &) = delete;
 
   MCSection(const MCSection &) = delete;
   void operator=(const MCSection &) = delete;
 
-  MCSymbol *Begin;
+  mutable MCSymbol *Begin;
   mutable MCSymbol *End;
 
 protected:
   mutable MCSymbol *End;
 
 protected:
@@ -52,6 +52,10 @@ public:
   SectionVariant getVariant() const { return Variant; }
 
   MCSymbol *getBeginSymbol() const { return Begin; }
   SectionVariant getVariant() const { return Variant; }
 
   MCSymbol *getBeginSymbol() const { return Begin; }
+  void setBeginSymbol(MCSymbol *Sym) const {
+    assert(!Begin);
+    Begin = Sym;
+  }
   MCSymbol *getEndSymbol(MCContext &Ctx) const;
   bool hasEnded() const;
 
   MCSymbol *getEndSymbol(MCContext &Ctx) const;
   bool hasEnded() const;