X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FMC%2FMCSection.h;h=55270a5f9ef2e3eafd506f128a690306c6c08b08;hp=ab8968ef2baf0a4e6918b6d2a25f253fb38bccb0;hb=43356a1a4506630777473b2090a65c7a54da94ee;hpb=dc089e4dc35defe70c3c05e1ccc177566dc1316e diff --git a/include/llvm/MC/MCSection.h b/include/llvm/MC/MCSection.h index ab8968ef2ba..55270a5f9ef 100644 --- a/include/llvm/MC/MCSection.h +++ b/include/llvm/MC/MCSection.h @@ -35,7 +35,7 @@ private: MCSection(const MCSection &) = delete; void operator=(const MCSection &) = delete; - MCSymbol *Begin; + mutable MCSymbol *Begin; mutable MCSymbol *End; protected: @@ -52,6 +52,10 @@ public: 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;