Move alignment from MCSectionData to MCSection.
[oota-llvm.git] / include / llvm / MC / MCStreamer.h
index 9f679c2482fbd3149acba35eb5485a973e606022..c6950ee35730c2f3ac98ffec6a50e321279b88ef 100644 (file)
@@ -42,7 +42,7 @@ class raw_ostream;
 class formatted_raw_ostream;
 class AssemblerConstantPools;
 
-typedef std::pair<const MCSection *, const MCExpr *> MCSectionSubPair;
+typedef std::pair<MCSection *, const MCExpr *> MCSectionSubPair;
 
 /// Target specific streamer interface. This is used so that targets can
 /// implement support for target specific assembly directives.
@@ -313,7 +313,7 @@ public:
   ///
   /// This is called by PopSection and SwitchSection, if the current
   /// section changes.
-  virtual void ChangeSection(const MCSection *, const MCExpr *);
+  virtual void ChangeSection(MCSection *, const MCExpr *);
 
   /// \brief Save the current and previous section on the section stack.
   void PushSection() {
@@ -348,13 +348,13 @@ public:
   /// is required to update CurSection.
   ///
   /// This corresponds to assembler directives like .section, .text, etc.
-  virtual void SwitchSection(const MCSection *Section,
+  virtual void SwitchSection(MCSection *Section,
                              const MCExpr *Subsection = nullptr);
 
   /// \brief Set the current section where code is being emitted to \p Section.
   /// This is required to update CurSection. This version does not call
   /// ChangeSection.
-  void SwitchSectionNoChange(const MCSection *Section,
+  void SwitchSectionNoChange(MCSection *Section,
                              const MCExpr *Subsection = nullptr) {
     assert(Section && "Cannot switch to a null section!");
     MCSectionSubPair curSection = SectionStack.back().first;
@@ -366,13 +366,13 @@ public:
   /// \brief Create the default sections and set the initial one.
   virtual void InitSections(bool NoExecStack);
 
-  MCSymbol *endSection(const MCSection *Section);
+  MCSymbol *endSection(MCSection *Section);
 
   /// \brief Sets the symbol's section.
   ///
   /// Each emitted symbol will be tracked in the ordering table,
   /// so we can sort on them later.
-  void AssignSection(MCSymbol *Symbol, const MCSection *Section);
+  void AssignSection(MCSymbol *Symbol, MCSection *Section);
 
   /// \brief Emit a label for \p Symbol into the current section.
   ///
@@ -500,9 +500,8 @@ public:
   /// \param Size - The size of the zerofill symbol.
   /// \param ByteAlignment - The alignment of the zerofill symbol if
   /// non-zero. This must be a power of 2 on some targets.
-  virtual void EmitZerofill(const MCSection *Section,
-                            MCSymbol *Symbol = nullptr, uint64_t Size = 0,
-                            unsigned ByteAlignment = 0) = 0;
+  virtual void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
+                            uint64_t Size = 0, unsigned ByteAlignment = 0) = 0;
 
   /// \brief Emit a thread local bss (.tbss) symbol.
   ///
@@ -511,7 +510,7 @@ public:
   /// \param Size - The size of the symbol.
   /// \param ByteAlignment - The alignment of the thread local common symbol
   /// if non-zero.  This must be a power of 2 on some targets.
-  virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
+  virtual void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
                               uint64_t Size, unsigned ByteAlignment = 0);
 
   /// @}
@@ -728,7 +727,7 @@ public:
   /// \brief Finish emission of machine code.
   void Finish();
 
-  virtual bool mayHaveInstructions(const MCSection &Sec) const { return true; }
+  virtual bool mayHaveInstructions(MCSection &Sec) const { return true; }
 };
 
 /// Create a dummy machine code streamer, which does nothing. This is useful for