Move alignment from MCSectionData to MCSection.
[oota-llvm.git] / include / llvm / MC / MCAssembler.h
index 4c360646c6db20071e0aa228955716b92e7da98e..0116aed2442cb69d063ac09c28541259efd7f9c1 100644 (file)
@@ -557,7 +557,7 @@ public:
 
 private:
   FragmentListType Fragments;
-  const MCSection *Section;
+  MCSection *Section;
 
   /// Ordinal - The section index in the assemblers section list.
   unsigned Ordinal;
@@ -565,9 +565,6 @@ private:
   /// LayoutOrder - The index of this section in the layout order.
   unsigned LayoutOrder;
 
-  /// Alignment - The maximum alignment seen in this section.
-  unsigned Alignment;
-
   /// \brief Keeping track of bundle-locked state.
   BundleLockStateType BundleLockState;
 
@@ -596,12 +593,12 @@ private:
 public:
   // Only for use as sentinel.
   MCSectionData();
-  MCSectionData(const MCSection &Section, MCAssembler *A = nullptr);
+  MCSectionData(MCSection &Section, MCAssembler *A = nullptr);
 
-  const MCSection &getSection() const { return *Section; }
+  MCSection &getSection() const { return *Section; }
 
-  unsigned getAlignment() const { return Alignment; }
-  void setAlignment(unsigned Value) { Alignment = Value; }
+  unsigned getAlignment() const;
+  void setAlignment(unsigned Value);
 
   bool hasInstructions() const { return HasInstructions; }
   void setHasInstructions(bool Value) { HasInstructions = Value; }
@@ -1021,7 +1018,7 @@ public:
     return *Entry;
   }
 
-  MCSectionData &getOrCreateSectionData(const MCSection &Section,
+  MCSectionData &getOrCreateSectionData(MCSection &Section,
                                         bool *Created = nullptr) {
     MCSectionData *&Entry = SectionMap[&Section];