class MCELFStreamer
Declaration
class MCELFStreamer : public MCObjectStreamer { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:23
Inherits from: MCObjectStreamer
Method Overview
- public void ChangeSection(llvm::MCSection * Section, const llvm::MCExpr * Subsection)
- public void EmitAssemblerFlag(llvm::MCAssemblerFlag Flag)
- public void EmitBundleAlignMode(unsigned int AlignPow2)
- public void EmitBundleLock(bool AlignToEnd)
- public void EmitBundleUnlock()
- public void EmitCommonSymbol(llvm::MCSymbol * Symbol, uint64_t Size, unsigned int ByteAlignment)
- public void EmitIdent(llvm::StringRef IdentString)
- public void EmitLabel(llvm::MCSymbol * Symbol, llvm::SMLoc Loc = llvm::SMLoc())
- public void EmitLabelAtPos(llvm::MCSymbol * Symbol, llvm::SMLoc Loc, llvm::MCFragment * F, uint64_t Offset)
- public void EmitLocalCommonSymbol(llvm::MCSymbol * Symbol, uint64_t Size, unsigned int ByteAlignment)
- public bool EmitSymbolAttribute(llvm::MCSymbol * Symbol, llvm::MCSymbolAttr Attribute)
- public void EmitSymbolDesc(llvm::MCSymbol * Symbol, unsigned int DescValue)
- public void EmitTBSSSymbol(llvm::MCSection * Section, llvm::MCSymbol * Symbol, uint64_t Size, unsigned int ByteAlignment = 0)
- public void EmitThumbFunc(llvm::MCSymbol * Func)
- public void EmitValueImpl(const llvm::MCExpr * Value, unsigned int Size, llvm::SMLoc Loc = llvm::SMLoc())
- public void EmitValueToAlignment(unsigned int, int64_t, unsigned int, unsigned int)
- public void EmitWeakReference(llvm::MCSymbol * Alias, const llvm::MCSymbol * Symbol)
- public void EmitZerofill(llvm::MCSection * Section, llvm::MCSymbol * Symbol = nullptr, uint64_t Size = 0, unsigned int ByteAlignment = 0, llvm::SMLoc L = llvm::SMLoc())
- public void FinishImpl()
- public void InitSections(bool NoExecStack)
- public MCELFStreamer(llvm::MCContext & Context, std::unique_ptr<MCAsmBackend> TAB, std::unique_ptr<MCObjectWriter> OW, std::unique_ptr<MCCodeEmitter> Emitter)
- public void emitCGProfileEntry(const llvm::MCSymbolRefExpr * From, const llvm::MCSymbolRefExpr * To, uint64_t Count)
- public void emitELFSize(llvm::MCSymbol * Symbol, const llvm::MCExpr * Value)
- public void emitELFSymverDirective(llvm::StringRef AliasName, const llvm::MCSymbol * Aliasee)
- public void reset()
- public ~MCELFStreamer()
Inherited from MCObjectStreamer:
- public ChangeSection
- public EmitAddrsig
- public EmitAddrsigSym
- public EmitAssignment
- public EmitBundleAlignMode
- public EmitBundleLock
- public EmitBundleUnlock
- public EmitBytes
- public EmitCFISections
- public EmitCVDefRangeDirective
- public EmitCVFileChecksumOffsetDirective
- public EmitCVFileChecksumsDirective
- public EmitCVInlineLinetableDirective
- public EmitCVLinetableDirective
- public EmitCVLocDirective
- public EmitCVStringTableDirective
- public EmitCodeAlignment
- public EmitDTPRel32Value
- public EmitDTPRel64Value
- public EmitDwarfAdvanceFrameAddr
- public EmitDwarfAdvanceLineAddr
- public EmitDwarfLocDirective
- public EmitFileDirective
- public EmitFrames
- public EmitGPRel32Value
- public EmitGPRel64Value
- public EmitInstToFragment
- public EmitInstruction
- public EmitLabel
- public EmitLabelAtPos
- public EmitRelocDirective
- public EmitSLEB128Value
- public EmitTPRel32Value
- public EmitTPRel64Value
- public EmitULEB128Value
- public EmitValueImpl
- public EmitValueToAlignment
- public EmitWeakReference
- public FinishImpl
- protected addPendingLabel
- protected changeSectionImpl
- public emitAbsoluteSymbolDiff
- public emitAbsoluteSymbolDiffAsULEB128
- public emitFill
- public emitFill
- public emitValueToOffset
- public flushPendingLabels
- protected flushPendingLabels
- public getAssembler
- public getAssemblerPtr
- public getCurrentFragment
- public getOrCreateDataFragment
- public insert
- public isIntegratedAssemblerRequired
- public mayHaveInstructions
- public reset
- public visitUsedSymbol
Inherited from MCStreamer:
- public AddBlankLine
- public AddComment
- public AssignFragment
- public BeginCOFFSymbolDef
- public ChangeSection
- public EmitAddrsig
- public EmitAddrsigSym
- public EmitAssemblerFlag
- public EmitAssignment
- public EmitBinaryData
- public EmitBuildVersion
- public EmitBundleAlignMode
- public EmitBundleLock
- public EmitBundleUnlock
- public EmitBytes
- public EmitCFIAdjustCfaOffset
- public EmitCFIBKeyFrame
- public EmitCFIDefCfa
- public EmitCFIDefCfaOffset
- public EmitCFIDefCfaRegister
- public EmitCFIEndProc
- protected EmitCFIEndProcImpl
- public EmitCFIEscape
- public EmitCFIGnuArgsSize
- public EmitCFILabel
- public EmitCFILsda
- public EmitCFINegateRAState
- public EmitCFIOffset
- public EmitCFIPersonality
- public EmitCFIRegister
- public EmitCFIRelOffset
- public EmitCFIRememberState
- public EmitCFIRestore
- public EmitCFIRestoreState
- public EmitCFIReturnColumn
- public EmitCFISameValue
- public EmitCFISections
- public EmitCFISignalFrame
- public EmitCFIStartProc
- protected EmitCFIStartProcImpl
- public EmitCFIUndefined
- public EmitCFIWindowSave
- public EmitCOFFImgRel32
- public EmitCOFFSafeSEH
- public EmitCOFFSecRel32
- public EmitCOFFSectionIndex
- public EmitCOFFSymbolIndex
- public EmitCOFFSymbolStorageClass
- public EmitCOFFSymbolType
- public EmitCVDefRangeDirective
- public EmitCVDefRangeDirective
- public EmitCVDefRangeDirective
- public EmitCVDefRangeDirective
- public EmitCVDefRangeDirective
- public EmitCVFPOData
- public EmitCVFileChecksumOffsetDirective
- public EmitCVFileChecksumsDirective
- public EmitCVFileDirective
- public EmitCVFuncIdDirective
- public EmitCVInlineLinetableDirective
- public EmitCVInlineSiteIdDirective
- public EmitCVLinetableDirective
- public EmitCVLocDirective
- public EmitCVStringTableDirective
- public EmitCodeAlignment
- public EmitCodePaddingBasicBlockEnd
- public EmitCodePaddingBasicBlockStart
- public EmitCommonSymbol
- public EmitDTPRel32Value
- public EmitDTPRel64Value
- public EmitDataRegion
- public EmitDwarfFileDirective
- public EmitDwarfLocDirective
- public EmitEHSymAttributes
- public EmitFileDirective
- public EmitGPRel32Value
- public EmitGPRel64Value
- public EmitIdent
- public EmitInstruction
- public EmitIntValue
- public EmitIntValueInHex
- public EmitLOHDirective
- public EmitLabel
- public EmitLinkerOptions
- public EmitLocalCommonSymbol
- public EmitRawText
- protected EmitRawTextImpl
- public EmitRelocDirective
- public EmitSLEB128IntValue
- public EmitSLEB128Value
- public EmitSymbolAttribute
- public EmitSymbolDesc
- public EmitSymbolValue
- public EmitSyntaxDirective
- public EmitTBSSSymbol
- public EmitTPRel32Value
- public EmitTPRel64Value
- public EmitThumbFunc
- public EmitULEB128IntValue
- public EmitULEB128Value
- public EmitValue
- public EmitValueImpl
- public EmitValueToAlignment
- public EmitVersionForTarget
- public EmitVersionMin
- public EmitWeakReference
- public EmitWinCFIAllocStack
- public EmitWinCFIEndChained
- public EmitWinCFIEndProc
- public EmitWinCFIEndProlog
- public EmitWinCFIFuncletOrFuncEnd
- public EmitWinCFIPushFrame
- public EmitWinCFIPushReg
- public EmitWinCFISaveReg
- public EmitWinCFISaveXMM
- public EmitWinCFISetFrame
- public EmitWinCFIStartChained
- public EmitWinCFIStartProc
- public EmitWinEHHandler
- public EmitWinEHHandlerData
- protected EmitWindowsUnwindTables
- public EmitXCOFFLocalCommonSymbol
- public EmitZerofill
- public EmitZeros
- public EndCOFFSymbolDef
- public EnsureValidWinFrameInfo
- public Finish
- public FinishImpl
- public GetCommentOS
- public GetSymbolOrder
- public InitSections
- public PopSection
- public PushSection
- public SubSection
- public SwitchSection
- public SwitchSectionNoChange
- public addExplicitComment
- protected checkCVLocSection
- public emitAbsoluteSymbolDiff
- public emitAbsoluteSymbolDiffAsULEB128
- public emitCGProfileEntry
- public emitDwarfFile0Directive
- public emitELFSize
- public emitELFSymverDirective
- public emitExplicitComments
- public emitFill
- public emitFill
- public emitFill
- public emitRawComment
- public emitValueToOffset
- public endSection
- public generateCompactUnwindEncodings
- public getAllowAutoPadding
- public getAssemblerPtr
- public getAssociatedPDataSection
- public getAssociatedXDataSection
- public getContext
- public getCurrentSection
- public getCurrentSectionOnly
- protected getCurrentWinFrameInfo
- public getDwarfFrameInfos
- public getDwarfLineTableSymbol
- public getNumFrameInfos
- public getNumWinFrameInfos
- public getPreviousSection
- public getTargetStreamer
- public getUseAssemblerInfoForParsing
- public getWinFrameInfos
- public hasRawTextSupport
- public hasUnfinishedDwarfFrameInfo
- public isIntegratedAssemblerRequired
- public isVerboseAsm
- public mayHaveInstructions
- public reset
- public setAllowAutoPadding
- public setTargetStreamer
- public setUseAssemblerInfoForParsing
- public tryEmitDwarfFileDirective
- public visitUsedExpr
- public visitUsedSymbol
Methods
¶void ChangeSection(llvm::MCSection* Section,
const llvm::MCExpr* Subsection)
void ChangeSection(llvm::MCSection* Section,
const llvm::MCExpr* Subsection)
Description
Update streamer for a new active section. This is called by PopSection and SwitchSection, if the current section changes.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:42
Parameters
- llvm::MCSection* Section
- const llvm::MCExpr* Subsection
¶void EmitAssemblerFlag(llvm::MCAssemblerFlag Flag)
void EmitAssemblerFlag(llvm::MCAssemblerFlag Flag)
Description
Note in the output the specified \p Flag.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:46
Parameters
- llvm::MCAssemblerFlag Flag
¶void EmitBundleAlignMode(unsigned int AlignPow2)
void EmitBundleAlignMode(unsigned int AlignPow2)
Description
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.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:78
Parameters
- unsigned int AlignPow2
¶void EmitBundleLock(bool AlignToEnd)
void EmitBundleLock(bool AlignToEnd)
Description
The following instructions are a bundle-locked group.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:79
Parameters
- bool AlignToEnd
- - If true, the bundle-locked group will be aligned to the end of a bundle.
¶void EmitBundleUnlock()
void EmitBundleUnlock()
Description
Ends a bundle-locked group.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:80
¶void EmitCommonSymbol(llvm::MCSymbol* Symbol,
uint64_t Size,
unsigned int ByteAlignment)
void EmitCommonSymbol(llvm::MCSymbol* Symbol,
uint64_t Size,
unsigned int ByteAlignment)
Description
Emit a common symbol.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:51
Parameters
- llvm::MCSymbol* Symbol
- - The common symbol to emit.
- uint64_t Size
- - The size of the common symbol.
- unsigned int ByteAlignment
- - The alignment of the symbol if non-zero. This must be a power of 2.
¶void EmitIdent(llvm::StringRef IdentString)
void EmitIdent(llvm::StringRef IdentString)
Description
Emit the "identifiers" directive. This implements the '.ident "version foo"' assembler directive.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:69
Parameters
- llvm::StringRef IdentString
¶void EmitLabel(llvm::MCSymbol* Symbol,
llvm::SMLoc Loc = llvm::SMLoc())
void EmitLabel(llvm::MCSymbol* Symbol,
llvm::SMLoc Loc = llvm::SMLoc())
Description
@ {
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:43
Parameters
- llvm::MCSymbol* Symbol
- llvm::SMLoc Loc = llvm::SMLoc()
¶void EmitLabelAtPos(llvm::MCSymbol* Symbol,
llvm::SMLoc Loc,
llvm::MCFragment* F,
uint64_t Offset)
void EmitLabelAtPos(llvm::MCSymbol* Symbol,
llvm::SMLoc Loc,
llvm::MCFragment* F,
uint64_t Offset)
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:44
Parameters
- llvm::MCSymbol* Symbol
- llvm::SMLoc Loc
- llvm::MCFragment* F
- uint64_t Offset
¶void EmitLocalCommonSymbol(
llvm::MCSymbol* Symbol,
uint64_t Size,
unsigned int ByteAlignment)
void EmitLocalCommonSymbol(
llvm::MCSymbol* Symbol,
uint64_t Size,
unsigned int ByteAlignment)
Description
Emit a local common (.lcomm) symbol.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:58
Parameters
- llvm::MCSymbol* Symbol
- - The common symbol to emit.
- uint64_t Size
- - The size of the common symbol.
- unsigned int ByteAlignment
- - The alignment of the common symbol in bytes.
¶bool EmitSymbolAttribute(
llvm::MCSymbol* Symbol,
llvm::MCSymbolAttr Attribute)
bool EmitSymbolAttribute(
llvm::MCSymbol* Symbol,
llvm::MCSymbolAttr Attribute)
Description
Add the given \p Attribute to \p Symbol.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:49
Parameters
- llvm::MCSymbol* Symbol
- llvm::MCSymbolAttr Attribute
¶void EmitSymbolDesc(llvm::MCSymbol* Symbol,
unsigned int DescValue)
void EmitSymbolDesc(llvm::MCSymbol* Symbol,
unsigned int DescValue)
Description
Set the \p DescValue for the \p Symbol.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:50
Parameters
- llvm::MCSymbol* Symbol
- - The symbol to have its n_desc field set.
- unsigned int DescValue
- - The value to set into the n_desc field.
¶void EmitTBSSSymbol(
llvm::MCSection* Section,
llvm::MCSymbol* Symbol,
uint64_t Size,
unsigned int ByteAlignment = 0)
void EmitTBSSSymbol(
llvm::MCSection* Section,
llvm::MCSymbol* Symbol,
uint64_t Size,
unsigned int ByteAlignment = 0)
Description
Emit a thread local bss (.tbss) symbol.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:64
Parameters
- llvm::MCSection* Section
- - The thread local common section.
- llvm::MCSymbol* Symbol
- - The thread local common symbol to emit.
- uint64_t Size
- - The size of the symbol.
- unsigned int ByteAlignment = 0
- - The alignment of the thread local common symbol if non-zero. This must be a power of 2 on some targets.
¶void EmitThumbFunc(llvm::MCSymbol* Func)
void EmitThumbFunc(llvm::MCSymbol* Func)
Description
Note in the output that the specified \p Func is a Thumb mode function (ARM target only).
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:47
Parameters
- llvm::MCSymbol* Func
¶void EmitValueImpl(
const llvm::MCExpr* Value,
unsigned int Size,
llvm::SMLoc Loc = llvm::SMLoc())
void EmitValueImpl(
const llvm::MCExpr* Value,
unsigned int Size,
llvm::SMLoc Loc = llvm::SMLoc())
Description
Emit the expression \p Value into the output as a native integer of the given \p Size bytes. This is used to implement assembler directives such as .word, .quad, etc.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:66
Parameters
- const llvm::MCExpr* Value
- - The value to emit.
- unsigned int Size
- - The size of the integer (in bytes) to emit. This must match a native machine width.
- llvm::SMLoc Loc = llvm::SMLoc()
- - The location of the expression for error reporting.
¶void EmitValueToAlignment(unsigned int,
int64_t,
unsigned int,
unsigned int)
void EmitValueToAlignment(unsigned int,
int64_t,
unsigned int,
unsigned int)
Description
Emit some number of copies of \p Value until the byte alignment \p ByteAlignment is reached. If the number of bytes need to emit for the alignment is not a multiple of \p ValueSize, then the contents of the emitted fill bytes is undefined. This used to implement the .align assembler directive.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:71
Parameters
- unsigned int
- int64_t
- unsigned int
- unsigned int
¶void EmitWeakReference(
llvm::MCSymbol* Alias,
const llvm::MCSymbol* Symbol)
void EmitWeakReference(
llvm::MCSymbol* Alias,
const llvm::MCSymbol* Symbol)
Description
Emit an weak reference from \p Alias to \p Symbol. This corresponds to an assembler statement such as: .weakref alias, symbol
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:48
Parameters
- llvm::MCSymbol* Alias
- - The alias that is being created.
- const llvm::MCSymbol* Symbol
- - The symbol being aliased.
¶void EmitZerofill(
llvm::MCSection* Section,
llvm::MCSymbol* Symbol = nullptr,
uint64_t Size = 0,
unsigned int ByteAlignment = 0,
llvm::SMLoc L = llvm::SMLoc())
void EmitZerofill(
llvm::MCSection* Section,
llvm::MCSymbol* Symbol = nullptr,
uint64_t Size = 0,
unsigned int ByteAlignment = 0,
llvm::SMLoc L = llvm::SMLoc())
Description
Emit the zerofill section and an optional symbol.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:61
Parameters
- llvm::MCSection* Section
- - The zerofill section to create and or to put the symbol
- llvm::MCSymbol* Symbol = nullptr
- - The zerofill symbol to emit, if non-NULL.
- uint64_t Size = 0
- - The size of the zerofill symbol.
- unsigned int ByteAlignment = 0
- - The alignment of the zerofill symbol if non-zero. This must be a power of 2 on some targets.
- llvm::SMLoc L = llvm::SMLoc()
¶void FinishImpl()
void FinishImpl()
Description
Streamer specific finalization.
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:76
¶void InitSections(bool NoExecStack)
void InitSections(bool NoExecStack)
Description
@ {
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:41
Parameters
- bool NoExecStack
¶MCELFStreamer(
llvm::MCContext& Context,
std::unique_ptr<MCAsmBackend> TAB,
std::unique_ptr<MCObjectWriter> OW,
std::unique_ptr<MCCodeEmitter> Emitter)
MCELFStreamer(
llvm::MCContext& Context,
std::unique_ptr<MCAsmBackend> TAB,
std::unique_ptr<MCObjectWriter> OW,
std::unique_ptr<MCCodeEmitter> Emitter)
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:25
Parameters
- llvm::MCContext& Context
- std::unique_ptr<MCAsmBackend> TAB
- std::unique_ptr<MCObjectWriter> OW
- std::unique_ptr<MCCodeEmitter> Emitter
¶void emitCGProfileEntry(
const llvm::MCSymbolRefExpr* From,
const llvm::MCSymbolRefExpr* To,
uint64_t Count)
void emitCGProfileEntry(
const llvm::MCSymbolRefExpr* From,
const llvm::MCSymbolRefExpr* To,
uint64_t Count)
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:73
Parameters
- const llvm::MCSymbolRefExpr* From
- const llvm::MCSymbolRefExpr* To
- uint64_t Count
¶void emitELFSize(llvm::MCSymbol* Symbol,
const llvm::MCExpr* Value)
void emitELFSize(llvm::MCSymbol* Symbol,
const llvm::MCExpr* Value)
Description
Emit an ELF .size directive. This corresponds to an assembler statement such as: .size symbol, expression
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:54
Parameters
- llvm::MCSymbol* Symbol
- const llvm::MCExpr* Value
¶void emitELFSymverDirective(
llvm::StringRef AliasName,
const llvm::MCSymbol* Aliasee)
void emitELFSymverDirective(
llvm::StringRef AliasName,
const llvm::MCSymbol* Aliasee)
Description
Emit an ELF .symver directive. This corresponds to an assembler statement such as: .symver _start, foo @ SOME_VERSION
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:55
Parameters
- llvm::StringRef AliasName
- - The versioned alias (i.e. "foo@@SOME_VERSION")
- const llvm::MCSymbol* Aliasee
- - The aliased symbol (i.e. "_start")
¶void reset()
void reset()
Description
state management
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:32
¶~MCELFStreamer()
~MCELFStreamer()
Declared at: llvm/include/llvm/MC/MCELFStreamer.h:29