summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/MC/MCSection.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/MC/MCSection.h')
-rw-r--r--llvm/include/llvm/MC/MCSection.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/include/llvm/MC/MCSection.h b/llvm/include/llvm/MC/MCSection.h
index ab8968ef2ba..55270a5f9ef 100644
--- a/llvm/include/llvm/MC/MCSection.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud