LLVM API Documentation
Streaming object file generation interface. More...
#include <MCObjectStreamer.h>
Public Member Functions | |
void | reset () override |
state management | |
bool | isIntegratedAssemblerRequired () const override |
Object streamers require the integrated assembler. | |
MCSymbolData & | getOrCreateSymbolData (const MCSymbol *Symbol) |
void | EmitFrames (MCAsmBackend *MAB) |
void | EmitCFISections (bool EH, bool Debug) override |
void | visitUsedSymbol (const MCSymbol &Sym) override |
MCAssembler & | getAssembler () |
MCStreamer Interface | |
void | EmitLabel (MCSymbol *Symbol) override |
void | EmitAssignment (MCSymbol *Symbol, const MCExpr *Value) override |
void | EmitValueImpl (const MCExpr *Value, unsigned Size, const SMLoc &Loc=SMLoc()) override |
void | EmitULEB128Value (const MCExpr *Value) override |
void | EmitSLEB128Value (const MCExpr *Value) override |
void | EmitWeakReference (MCSymbol *Alias, const MCSymbol *Symbol) override |
void | ChangeSection (const MCSection *Section, const MCExpr *Subsection) override |
void | EmitInstruction (const MCInst &Inst, const MCSubtargetInfo &STI) override |
virtual void | EmitInstToFragment (const MCInst &Inst, const MCSubtargetInfo &) |
Emit an instruction to a special fragment, because this instruction can change its size during relaxation. | |
void | EmitBundleAlignMode (unsigned AlignPow2) override |
Set the bundle alignment mode from now on in the section. The argument is the power of 2 to which the alignment is set. The value 0 means turn the bundle alignment off. | |
void | EmitBundleLock (bool AlignToEnd) override |
The following instructions are a bundle-locked group. | |
void | EmitBundleUnlock () override |
Ends a bundle-locked group. | |
void | EmitBytes (StringRef Data) override |
void | EmitValueToAlignment (unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0) override |
void | EmitCodeAlignment (unsigned ByteAlignment, unsigned MaxBytesToEmit=0) override |
bool | EmitValueToOffset (const MCExpr *Offset, unsigned char Value) override |
void | EmitDwarfLocDirective (unsigned FileNo, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator, StringRef FileName) override |
EmitDwarfLocDirective - This implements the DWARF2. | |
void | EmitDwarfAdvanceLineAddr (int64_t LineDelta, const MCSymbol *LastLabel, const MCSymbol *Label, unsigned PointerSize) |
void | EmitDwarfAdvanceFrameAddr (const MCSymbol *LastLabel, const MCSymbol *Label) |
void | EmitGPRel32Value (const MCExpr *Value) override |
void | EmitGPRel64Value (const MCExpr *Value) override |
void | EmitFill (uint64_t NumBytes, uint8_t FillValue) override |
void | EmitZeros (uint64_t NumBytes) override |
Emit NumBytes worth of zeros. This function properly handles data in virtual sections. | |
void | FinishImpl () override |
FinishImpl - Streamer specific finalization. | |
bool | mayHaveInstructions () const override |
Protected Member Functions | |
MCObjectStreamer (MCContext &Context, MCAsmBackend &TAB, raw_ostream &_OS, MCCodeEmitter *_Emitter) | |
MCObjectStreamer (MCContext &Context, MCAsmBackend &TAB, raw_ostream &_OS, MCCodeEmitter *_Emitter, MCAssembler *_Assembler) | |
~MCObjectStreamer () | |
MCSectionData * | getCurrentSectionData () const |
MCFragment * | getCurrentFragment () const |
void | insert (MCFragment *F) const |
MCDataFragment * | getOrCreateDataFragment () const |
Streaming object file generation interface.
This class provides an implementation of the MCStreamer interface which is suitable for use with the assembler backend. Specific object file formats are expected to subclass this interface to implement directives specific to that file format or custom semantics expected by the object writer implementation.
Definition at line 34 of file MCObjectStreamer.h.
MCObjectStreamer::MCObjectStreamer | ( | MCContext & | Context, |
MCAsmBackend & | TAB, | ||
raw_ostream & | _OS, | ||
MCCodeEmitter * | _Emitter | ||
) | [protected] |
Definition at line 25 of file MCObjectStreamer.cpp.
MCObjectStreamer::MCObjectStreamer | ( | MCContext & | Context, |
MCAsmBackend & | TAB, | ||
raw_ostream & | _OS, | ||
MCCodeEmitter * | _Emitter, | ||
MCAssembler * | _Assembler | ||
) | [protected] |
Definition at line 32 of file MCObjectStreamer.cpp.
MCObjectStreamer::~MCObjectStreamer | ( | ) | [protected] |
Definition at line 38 of file MCObjectStreamer.cpp.
References llvm::MCAssembler::getBackend(), llvm::MCAssembler::getEmitter(), and llvm::MCAssembler::getWriter().
void MCObjectStreamer::ChangeSection | ( | const MCSection * | , |
const MCExpr * | |||
) | [override, virtual] |
ChangeSection - Update streamer for a new active section.
This is called by PopSection and SwitchSection, if the current section changes.
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer.
Definition at line 164 of file MCObjectStreamer.cpp.
References getAssembler(), llvm::MCAssembler::getOrCreateSectionData(), llvm::MCSectionData::getSubsectionInsertionPoint(), and llvm::report_fatal_error().
void MCObjectStreamer::EmitAssignment | ( | MCSymbol * | Symbol, |
const MCExpr * | Value | ||
) | [override, virtual] |
EmitAssignment - Emit an assignment of Value
to Symbol
.
This corresponds to an assembler statement such as: symbol = value
The assignment generates no code, but has the side effect of binding the value in the current context. For the assembly streamer, this prints the binding into the .s file.
Symbol | - The symbol being assigned to. |
Value | - The value for the symbol. |
Reimplemented from llvm::MCStreamer.
Definition at line 180 of file MCObjectStreamer.cpp.
References getAssembler(), and llvm::MCAssembler::getOrCreateSymbolData().
void MCObjectStreamer::EmitBundleAlignMode | ( | unsigned | AlignPow2 | ) | [override, virtual] |
Set the bundle alignment mode from now on in the section. The argument is the power of 2 to which the alignment is set. The value 0 means turn the bundle alignment off.
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer.
Definition at line 242 of file MCObjectStreamer.cpp.
References BundlingNotImplementedMsg, and llvm_unreachable.
void MCObjectStreamer::EmitBundleLock | ( | bool | AlignToEnd | ) | [override, virtual] |
The following instructions are a bundle-locked group.
AlignToEnd | - If true, the bundle-locked group will be aligned to the end of a bundle. |
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer.
Definition at line 246 of file MCObjectStreamer.cpp.
References BundlingNotImplementedMsg, and llvm_unreachable.
void MCObjectStreamer::EmitBundleUnlock | ( | ) | [override, virtual] |
Ends a bundle-locked group.
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer.
Definition at line 250 of file MCObjectStreamer.cpp.
References BundlingNotImplementedMsg, and llvm_unreachable.
void MCObjectStreamer::EmitBytes | ( | StringRef | Data | ) | [override, virtual] |
EmitBytes - Emit the bytes in Data
into the output.
This is used to implement assembler directives such as .byte, .ascii, etc.
Reimplemented from llvm::MCStreamer.
Definition at line 318 of file MCObjectStreamer.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::StringRef::begin(), llvm::StringRef::end(), llvm::MCDataFragment::getContents(), llvm::MCStreamer::getCurrentSection(), getOrCreateDataFragment(), and llvm::MCLineEntry::Make().
Referenced by llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), and llvm::MCELFStreamer::EmitIdent().
void MCObjectStreamer::EmitCFISections | ( | bool | EH, |
bool | Debug | ||
) | [override, virtual] |
Reimplemented from llvm::MCStreamer.
Definition at line 90 of file MCObjectStreamer.cpp.
References Debug.
void MCObjectStreamer::EmitCodeAlignment | ( | unsigned | ByteAlignment, |
unsigned | MaxBytesToEmit = 0 |
||
) | [override, virtual] |
EmitCodeAlignment - Emit nops until the byte alignment ByteAlignment
is reached.
This used to align code where the alignment bytes may be executed. This can emit different bytes for different sizes to optimize execution.
ByteAlignment | - The alignment to reach. This must be a power of two on some targets. |
MaxBytesToEmit | - The maximum numbers of bytes to emit, or 0. If the alignment cannot be reached in this many bytes, no bytes are emitted. |
Reimplemented from llvm::MCStreamer.
Definition at line 336 of file MCObjectStreamer.cpp.
References EmitValueToAlignment(), and getCurrentFragment().
Referenced by llvm::MCWinCOFFStreamer::InitSections(), and llvm::MCELFStreamer::InitSections().
void MCObjectStreamer::EmitDwarfAdvanceFrameAddr | ( | const MCSymbol * | LastLabel, |
const MCSymbol * | Label | ||
) |
Definition at line 307 of file MCObjectStreamer.cpp.
References buildSymbolDiff(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), getAssembler(), and insert().
void MCObjectStreamer::EmitDwarfAdvanceLineAddr | ( | int64_t | LineDelta, |
const MCSymbol * | LastLabel, | ||
const MCSymbol * | Label, | ||
unsigned | PointerSize | ||
) |
Definition at line 290 of file MCObjectStreamer.cpp.
References buildSymbolDiff(), llvm::MCDwarfLineAddr::Emit(), emitDwarfSetLineAddr(), getAssembler(), and insert().
Referenced by EmitDwarfLineTable().
void MCObjectStreamer::EmitDwarfLocDirective | ( | unsigned | FileNo, |
unsigned | Line, | ||
unsigned | Column, | ||
unsigned | Flags, | ||
unsigned | Isa, | ||
unsigned | Discriminator, | ||
StringRef | FileName | ||
) | [override, virtual] |
EmitDwarfLocDirective - This implements the DWARF2.
Reimplemented from llvm::MCStreamer.
Definition at line 254 of file MCObjectStreamer.cpp.
References llvm::MCStreamer::getCurrentSection(), and llvm::MCLineEntry::Make().
void MCObjectStreamer::EmitFill | ( | uint64_t | NumBytes, |
uint8_t | FillValue | ||
) | [override, virtual] |
EmitFill - Emit NumBytes bytes worth of the value specified by FillValue. This implements directives such as '.space'.
Reimplemented from llvm::MCStreamer.
Definition at line 382 of file MCObjectStreamer.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::MCDataFragment::getContents(), and getOrCreateDataFragment().
Referenced by EmitValueToOffset().
void MCObjectStreamer::EmitFrames | ( | MCAsmBackend * | MAB | ) |
Definition at line 55 of file MCObjectStreamer.cpp.
References llvm::MCDwarfFrameEmitter::Emit(), and llvm::MCStreamer::getNumFrameInfos().
Referenced by llvm::MCELFStreamer::FinishImpl().
void MCObjectStreamer::EmitGPRel32Value | ( | const MCExpr * | Value | ) | [override, virtual] |
EmitGPRel32Value - Emit the expression Value
into the output as a gprel32 (32-bit GP relative) value.
This is used to implement assembler directives such as .gprel32 on targets that support them.
Reimplemented from llvm::MCStreamer.
Definition at line 365 of file MCObjectStreamer.cpp.
References llvm::MCFixup::Create(), llvm::FK_GPRel_4, llvm::MCDataFragment::getContents(), llvm::MCDataFragment::getFixups(), getOrCreateDataFragment(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
void MCObjectStreamer::EmitGPRel64Value | ( | const MCExpr * | Value | ) | [override, virtual] |
EmitGPRel64Value - Emit the expression Value
into the output as a gprel64 (64-bit GP relative) value.
This is used to implement assembler directives such as .gpdword on targets that support them.
Reimplemented from llvm::MCStreamer.
Definition at line 374 of file MCObjectStreamer.cpp.
References llvm::MCFixup::Create(), llvm::FK_GPRel_4, llvm::MCDataFragment::getContents(), llvm::MCDataFragment::getFixups(), getOrCreateDataFragment(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
void MCObjectStreamer::EmitInstruction | ( | const MCInst & | Inst, |
const MCSubtargetInfo & | STI | ||
) | [override, virtual] |
EmitInstruction - Emit the given Instruction
into the current section.
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MipsELFStreamer.
Definition at line 185 of file MCObjectStreamer.cpp.
References EmitInstToFragment(), getAssembler(), llvm::MCAssembler::getBackend(), llvm::MCStreamer::getCurrentSection(), getCurrentSectionData(), llvm::MCAssembler::getRelaxAll(), llvm::MCSectionData::isBundleLocked(), llvm::MCAssembler::isBundlingEnabled(), llvm::MCLineEntry::Make(), llvm::MCAsmBackend::mayNeedRelaxation(), llvm::MCAsmBackend::relaxInstruction(), and llvm::MCSectionData::setHasInstructions().
Referenced by llvm::MipsTargetELFStreamer::emitDirectiveCpload(), and llvm::MipsTargetELFStreamer::emitDirectiveCpsetup().
void MCObjectStreamer::EmitInstToFragment | ( | const MCInst & | Inst, |
const MCSubtargetInfo & | STI | ||
) | [virtual] |
Emit an instruction to a special fragment, because this instruction can change its size during relaxation.
Definition at line 222 of file MCObjectStreamer.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::tgtok::Code, llvm::MCCodeEmitter::EncodeInstruction(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::raw_ostream::flush(), getAssembler(), llvm::MCRelaxableFragment::getContents(), llvm::MCAssembler::getEmitter(), llvm::MCRelaxableFragment::getFixups(), and insert().
Referenced by EmitInstruction().
void MCObjectStreamer::EmitLabel | ( | MCSymbol * | Symbol | ) | [override, virtual] |
EmitLabel - Emit a label for Symbol
into the current section.
This corresponds to an assembler statement such as: foo:
Symbol | - The symbol to emit. A given symbol should only be emitted as a label once, and symbols emitted as a label should never be used in an assignment. |
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 126 of file MCObjectStreamer.cpp.
References F(), getAssembler(), llvm::MCDataFragment::getContents(), llvm::MCSymbolData::getFragment(), getOrCreateDataFragment(), llvm::MCAssembler::getOrCreateSymbolData(), llvm::MCSymbolData::setFragment(), llvm::MCSymbolData::setOffset(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::MCDwarfFrameEmitter::Emit(), llvm::MCDwarfLineTable::EmitCU(), EmitDwarfLineTable(), EmitValueToOffset(), and llvm::MCLineEntry::Make().
void MCObjectStreamer::EmitSLEB128Value | ( | const MCExpr * | Value | ) | [override, virtual] |
Reimplemented from llvm::MCStreamer.
Definition at line 150 of file MCObjectStreamer.cpp.
References llvm::MCStreamer::EmitSLEB128IntValue(), getAssembler(), and insert().
void MCObjectStreamer::EmitULEB128Value | ( | const MCExpr * | Value | ) | [override, virtual] |
Reimplemented from llvm::MCStreamer.
Definition at line 141 of file MCObjectStreamer.cpp.
References llvm::MCStreamer::EmitULEB128IntValue(), getAssembler(), and insert().
void MCObjectStreamer::EmitValueImpl | ( | const MCExpr * | Value, |
unsigned | Size, | ||
const SMLoc & | Loc = SMLoc() |
||
) | [override, virtual] |
EmitValue - Emit the expression Value
into the output as a native integer of the given Size
bytes.
This is used to implement assembler directives such as .word, .quad, etc.
Value | - The value to emit. |
Size | - The size of the integer (in bytes) to emit. This must match a native machine width. |
Loc | - The location of the expression for error reporting. |
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer.
Definition at line 96 of file MCObjectStreamer.cpp.
References llvm::MCFixup::Create(), llvm::MCStreamer::EmitIntValue(), getAssembler(), llvm::MCDataFragment::getContents(), llvm::MCStreamer::getCurrentSection(), llvm::MCDataFragment::getFixups(), llvm::MCFixup::getKindForSize(), getOrCreateDataFragment(), llvm::MCLineEntry::Make(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
void MCObjectStreamer::EmitValueToAlignment | ( | unsigned | ByteAlignment, |
int64_t | Value = 0 , |
||
unsigned | ValueSize = 1 , |
||
unsigned | MaxBytesToEmit = 0 |
||
) | [override, virtual] |
EmitValueToAlignment - Emit some number of copies of Value
until the byte alignment ByteAlignment
is reached.
If the number of bytes need to emit for the alignment is not a multiple of ValueSize
, then the contents of the emitted fill bytes is undefined.
This used to implement the .align assembler directive.
ByteAlignment | - The alignment to reach. This must be a power of two on some targets. |
Value | - The value to use when filling bytes. |
ValueSize | - The size of the integer (in bytes) to emit for Value . This must match a native machine width. |
MaxBytesToEmit | - The maximum numbers of bytes to emit, or 0. If the alignment cannot be reached in this many bytes, no bytes are emitted. |
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer.
Definition at line 323 of file MCObjectStreamer.cpp.
References llvm::LCOMM::ByteAlignment, getCurrentSectionData(), insert(), and llvm::MCSectionData::setAlignment().
Referenced by llvm::MCDwarfFrameEmitter::Emit(), and EmitCodeAlignment().
bool MCObjectStreamer::EmitValueToOffset | ( | const MCExpr * | Offset, |
unsigned char | Value | ||
) | [override, virtual] |
EmitValueToOffset - Emit some number of copies of Value
until the byte offset Offset
is reached.
This is used to implement assembler directives such as .org.
Offset | - The offset to reach. This may be an expression, but the expression must be associated with the current section. |
Value | - The value to use when filling bytes. |
Reimplemented from llvm::MCStreamer.
Definition at line 342 of file MCObjectStreamer.cpp.
References llvm::MCSymbolRefExpr::Create(), llvm::MCBinaryExpr::Create(), llvm::MCContext::CreateTempSymbol(), EmitFill(), EmitLabel(), getAssembler(), llvm::MCStreamer::getContext(), insert(), llvm::MCBinaryExpr::Sub, and llvm::MCSymbolRefExpr::VK_None.
void MCObjectStreamer::EmitWeakReference | ( | MCSymbol * | Alias, |
const MCSymbol * | Symbol | ||
) | [override, virtual] |
EmitWeakReference - Emit an weak reference from Alias
to Symbol
.
This corresponds to an assembler statement such as: .weakref alias, symbol
Alias | - The alias that is being created. |
Symbol | - The symbol being aliased. |
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer.
Definition at line 159 of file MCObjectStreamer.cpp.
References llvm::report_fatal_error().
void MCObjectStreamer::EmitZeros | ( | uint64_t | NumBytes | ) | [override, virtual] |
Emit NumBytes worth of zeros. This function properly handles data in virtual sections.
The implementation in this class just redirects to EmitFill.
Reimplemented from llvm::MCStreamer.
Definition at line 388 of file MCObjectStreamer.cpp.
References llvm::MCStreamer::getCurrentSection(), and insert().
void MCObjectStreamer::FinishImpl | ( | ) | [override, virtual] |
FinishImpl - Streamer specific finalization.
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 393 of file MCObjectStreamer.cpp.
References llvm::MCDwarfLineTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCAssembler::Finish(), getAssembler(), and llvm::MCStreamer::getContext().
MCAssembler& llvm::MCObjectStreamer::getAssembler | ( | ) | [inline] |
Definition at line 84 of file MCObjectStreamer.h.
Referenced by llvm::MCELFStreamer::ChangeSection(), ChangeSection(), llvm::createELFStreamer(), llvm::MCELFStreamer::EmitAssemblerFlag(), EmitAssignment(), llvm::MCELFStreamer::EmitBundleAlignMode(), llvm::MCELFStreamer::EmitBundleLock(), llvm::MCELFStreamer::EmitBundleUnlock(), llvm::MCWinCOFFStreamer::EmitCOFFSymbolStorageClass(), llvm::MCWinCOFFStreamer::EmitCOFFSymbolType(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MipsTargetELFStreamer::emitDirectiveAbiCalls(), llvm::MipsTargetELFStreamer::emitDirectiveCpload(), llvm::MipsTargetELFStreamer::emitDirectiveCpsetup(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::MipsTargetELFStreamer::emitDirectiveNaN2008(), llvm::MipsTargetELFStreamer::emitDirectiveNaNLegacy(), llvm::MipsTargetELFStreamer::emitDirectiveOptionPic0(), llvm::MipsTargetELFStreamer::emitDirectiveOptionPic2(), llvm::MipsTargetELFStreamer::emitDirectiveSetMicroMips(), llvm::MipsTargetELFStreamer::emitDirectiveSetMips16(), llvm::MipsTargetELFStreamer::emitDirectiveSetNoReorder(), EmitDwarfAdvanceFrameAddr(), EmitDwarfAdvanceLineAddr(), llvm::MCELFStreamer::EmitELFSize(), llvm::MCWinCOFFStreamer::EmitFileDirective(), llvm::MCELFStreamer::EmitFileDirective(), llvm::MipsTargetELFStreamer::emitFrame(), llvm::MCELFStreamer::EmitIdent(), llvm::AMDGPUAsmPrinter::EmitInstruction(), EmitInstruction(), llvm::MCWinCOFFStreamer::EmitInstToData(), EmitInstToFragment(), llvm::MCELFStreamer::EmitLabel(), EmitLabel(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), llvm::MCELFStreamer::EmitLocalCommonSymbol(), llvm::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), EmitSLEB128Value(), llvm::MCWinCOFFStreamer::EmitSymbolAttribute(), llvm::MCELFStreamer::EmitSymbolAttribute(), EmitULEB128Value(), EmitValueImpl(), EmitValueToOffset(), llvm::MCELFStreamer::EmitWeakReference(), llvm::MipsTargetELFStreamer::finish(), FinishImpl(), llvm::MCELFStreamer::Flush(), getOrCreateSymbolData(), and llvm::MipsTargetELFStreamer::MipsTargetELFStreamer().
MCFragment * MCObjectStreamer::getCurrentFragment | ( | ) | const [protected] |
Definition at line 66 of file MCObjectStreamer.cpp.
References llvm::sys::path::begin(), and getCurrentSectionData().
Referenced by EmitCodeAlignment(), and getOrCreateDataFragment().
MCSectionData* llvm::MCObjectStreamer::getCurrentSectionData | ( | ) | const [inline, protected] |
Definition at line 66 of file MCObjectStreamer.h.
Referenced by llvm::MCELFStreamer::ChangeSection(), llvm::MCELFStreamer::EmitBundleLock(), llvm::MCELFStreamer::EmitBundleUnlock(), EmitInstruction(), llvm::MCELFStreamer::EmitSymbolAttribute(), llvm::MCELFStreamer::EmitValueImpl(), llvm::MCELFStreamer::EmitValueToAlignment(), EmitValueToAlignment(), getCurrentFragment(), and mayHaveInstructions().
MCDataFragment * MCObjectStreamer::getOrCreateDataFragment | ( | ) | const [protected] |
Get a data fragment to write into, creating a new one if the current fragment is not a data fragment.
Definition at line 75 of file MCObjectStreamer.cpp.
References F(), getCurrentFragment(), llvm::MCDataFragment::hasInstructions(), insert(), and llvm::MCAssembler::isBundlingEnabled().
Referenced by EmitBytes(), llvm::MCWinCOFFStreamer::EmitCOFFSecRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSectionIndex(), EmitFill(), EmitGPRel32Value(), EmitGPRel64Value(), llvm::MCWinCOFFStreamer::EmitInstToData(), EmitLabel(), and EmitValueImpl().
MCSymbolData& llvm::MCObjectStreamer::getOrCreateSymbolData | ( | const MCSymbol * | Symbol | ) | [inline] |
Definition at line 59 of file MCObjectStreamer.h.
References getAssembler(), and llvm::MCAssembler::getOrCreateSymbolData().
Referenced by llvm::MipsTargetELFStreamer::emitAssignment(), and llvm::MipsTargetELFStreamer::emitLabel().
void llvm::MCObjectStreamer::insert | ( | MCFragment * | F | ) | const [inline, protected] |
Definition at line 72 of file MCObjectStreamer.h.
References llvm::MCSectionData::getFragmentList(), llvm::iplist< NodeTy, Traits >::insert(), and llvm::MCFragment::setParent().
Referenced by EmitDwarfAdvanceFrameAddr(), EmitDwarfAdvanceLineAddr(), EmitInstToFragment(), EmitSLEB128Value(), EmitULEB128Value(), EmitValueToAlignment(), EmitValueToOffset(), EmitZeros(), and getOrCreateDataFragment().
bool llvm::MCObjectStreamer::isIntegratedAssemblerRequired | ( | ) | const [inline, override, virtual] |
Object streamers require the integrated assembler.
Reimplemented from llvm::MCStreamer.
Definition at line 57 of file MCObjectStreamer.h.
bool llvm::MCObjectStreamer::mayHaveInstructions | ( | ) | const [inline, override, virtual] |
Reimplemented from llvm::MCStreamer.
Definition at line 129 of file MCObjectStreamer.h.
References getCurrentSectionData(), and llvm::MCSectionData::hasInstructions().
void MCObjectStreamer::reset | ( | ) | [override, virtual] |
state management
Reimplemented from llvm::MCStreamer.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 45 of file MCObjectStreamer.cpp.
References llvm::MCAssembler::reset().
void MCObjectStreamer::visitUsedSymbol | ( | const MCSymbol & | Sym | ) | [override, virtual] |
Reimplemented from llvm::MCStreamer.
Definition at line 86 of file MCObjectStreamer.cpp.
References llvm::MCAssembler::getOrCreateSymbolData().