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.
///
/// 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() {
/// 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;
/// \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.
///
/// \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.
///
/// \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);
/// @}
/// \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