summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/MC/MCSection.h6
-rw-r--r--llvm/include/llvm/MC/MCStreamer.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/llvm/include/llvm/MC/MCSection.h b/llvm/include/llvm/MC/MCSection.h
index 1e8e4f13225..ab8968ef2ba 100644
--- a/llvm/include/llvm/MC/MCSection.h
+++ b/llvm/include/llvm/MC/MCSection.h
@@ -20,6 +20,7 @@
namespace llvm {
class MCAsmInfo;
+class MCContext;
class MCExpr;
class MCSymbol;
class raw_ostream;
@@ -35,10 +36,11 @@ private:
void operator=(const MCSection &) = delete;
MCSymbol *Begin;
+ mutable MCSymbol *End;
protected:
MCSection(SectionVariant V, SectionKind K, MCSymbol *Begin)
- : Begin(Begin), Variant(V), Kind(K) {}
+ : Begin(Begin), End(nullptr), Variant(V), Kind(K) {}
SectionVariant Variant;
SectionKind Kind;
@@ -50,6 +52,8 @@ public:
SectionVariant getVariant() const { return Variant; }
MCSymbol *getBeginSymbol() const { return Begin; }
+ MCSymbol *getEndSymbol(MCContext &Ctx) const;
+ bool hasEnded() const;
virtual void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS,
const MCExpr *Subsection) const = 0;
diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h
index 3b3e13518ca..df7610b1d04 100644
--- a/llvm/include/llvm/MC/MCStreamer.h
+++ b/llvm/include/llvm/MC/MCStreamer.h
@@ -366,6 +366,8 @@ public:
/// Create the default sections and set the initial one.
virtual void InitSections(bool NoExecStack);
+ MCSymbol *endSection(const MCSection *Section);
+
/// AssignSection - Sets the symbol's section.
///
/// Each emitted symbol will be tracked in the ordering table,
OpenPOWER on IntegriCloud