summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/MC/MCAssembler.h7
-rw-r--r--llvm/include/llvm/MC/MCSection.h8
2 files changed, 9 insertions, 6 deletions
diff --git a/llvm/include/llvm/MC/MCAssembler.h b/llvm/include/llvm/MC/MCAssembler.h
index 564691e3e18..8f0105f6c2e 100644
--- a/llvm/include/llvm/MC/MCAssembler.h
+++ b/llvm/include/llvm/MC/MCAssembler.h
@@ -559,9 +559,6 @@ private:
FragmentListType Fragments;
MCSection *Section;
- /// Ordinal - The section index in the assemblers section list.
- unsigned Ordinal;
-
/// LayoutOrder - The index of this section in the layout order.
unsigned LayoutOrder;
@@ -600,8 +597,8 @@ public:
bool hasInstructions() const { return HasInstructions; }
void setHasInstructions(bool Value) { HasInstructions = Value; }
- unsigned getOrdinal() const { return Ordinal; }
- void setOrdinal(unsigned Value) { Ordinal = Value; }
+ unsigned getOrdinal() const;
+ void setOrdinal(unsigned Value);
unsigned getLayoutOrder() const { return LayoutOrder; }
void setLayoutOrder(unsigned Value) { LayoutOrder = Value; }
diff --git a/llvm/include/llvm/MC/MCSection.h b/llvm/include/llvm/MC/MCSection.h
index 38e7e210950..7d5128a2d20 100644
--- a/llvm/include/llvm/MC/MCSection.h
+++ b/llvm/include/llvm/MC/MCSection.h
@@ -39,10 +39,13 @@ private:
MCSymbol *End;
/// The alignment requirement of this section.
unsigned Alignment;
+ /// The section index in the assemblers section list.
+ unsigned Ordinal;
protected:
MCSection(SectionVariant V, SectionKind K, MCSymbol *Begin)
- : Begin(Begin), End(nullptr), Alignment(1), Variant(V), Kind(K) {}
+ : Begin(Begin), End(nullptr), Alignment(1), Ordinal(~UINT32_C(0)),
+ Variant(V), Kind(K) {}
SectionVariant Variant;
SectionKind Kind;
@@ -67,6 +70,9 @@ public:
unsigned getAlignment() const { return Alignment; }
void setAlignment(unsigned Value) { Alignment = Value; }
+ unsigned getOrdinal() const { return Ordinal; }
+ void setOrdinal(unsigned Value) { Ordinal = Value; }
+
virtual void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS,
const MCExpr *Subsection) const = 0;
OpenPOWER on IntegriCloud