llvm::MCAsmBaseStreamer

Base class for streamers that emit assembly text.

Synopsis

Declared in <llvm/MC/MCAsmStreamer.h>

class MCAsmBaseStreamer
    : public MCStreamer

Base Classes

NameDescription
MCStreamerStreaming machine code generation interface.

Member Functions

NameDescription
operator= [deleted]Deleted copy assignment.
AddComment [virtual]Add a textual comment.
EnsureValidWinFrameInfo Retrieve the current frame info if one is available and it is not yet closed. Otherwise, issue an error and return null.
addBlankLine [virtual]Emit a blank line to a .s file to pretty it up.
addEncodingComment Add a comment showing the encoding of an instruction.
addExplicitComment [virtual]Add explicit comment T. T is required to be a valid comment in the output and does not need to be escaped.
beginCOFFSymbolDef [virtual]Start emitting COFF symbol definition
emitAbsoluteSymbolDiff [virtual]Emit the absolute difference between two symbols.
emitAbsoluteSymbolDiffAsULEB128 [virtual]Emit the absolute difference between two symbols encoded with ULEB128.
emitAddrsig [virtual]Emit a .addrsig directive starting an address-significance table.
emitAddrsigSym [virtual]Add Sym to the address-significance table.
emitAssignment [virtual]Emit an assignment of Value to Symbol.
emitBinaryData [virtual]Functionally identical to EmitBytes. When emitting textual assembly, this method uses .byte directives instead of .ascii or .asciz for readability.
emitBuildVersion [virtual]Emit/Specify Mach-O build version command. Platform should be one of MachO::PlatformType.
emitBundleAlignMode [virtual]Enable aligned instruction bundling with the given bundle size.
emitBundleLock [virtual]The following instructions are a bundle-locked group.
emitBundleUnlock [virtual]Ends a bundle-locked group.
emitBytes [virtual]Emit the bytes in Data into the output.
emitCFIAdjustCfaOffset [virtual]Emit a .cfi_adjust_cfa_offset directive.
emitCFIBKeyFrame [virtual]Emit a .cfi_b_key_frame directive.
emitCFIDefCfa [virtual]Emit a .cfi_def_cfa directive.
emitCFIDefCfaOffset [virtual]Emit a .cfi_def_cfa_offset directive.
emitCFIDefCfaRegister [virtual]Emit a .cfi_def_cfa_register directive.
emitCFIEndProc Emit a .cfi_endproc directive.
emitCFIEscape [virtual]Emit a .cfi_escape directive with raw DWARF CFI bytes.
emitCFIGnuArgsSize [virtual]Emit a .cfi_gnu_args_size directive.
emitCFILLVMDefAspaceCfa [virtual]Emit a .cfi_llvm_def_aspace_cfa directive.
emitCFILLVMRegisterPair [virtual]Emit a .cfi_llvm_register_pair directive.
emitCFILLVMSetRAState emitCFILLVMSetRAState overloads
emitCFILLVMVectorOffset [virtual]Emit a .cfi_llvm_vector_offset directive.
emitCFILLVMVectorRegisterMask [virtual]Emit a .cfi_llvm_vector_register_mask directive.
emitCFILLVMVectorRegisters [virtual]Emit a .cfi_llvm_vector_registers directive.
emitCFILabel [virtual]When emitting an object file, create and emit a real label. When emitting textual assembly, this should do nothing to avoid polluting our output.
emitCFILabelDirective [virtual]Emit a .cfi_label directive.
emitCFILsda [virtual]Emit a .cfi_lsda directive.
emitCFIMTETaggedFrame [virtual]Emit a .cfi_mte_tagged_frame directive.
emitCFINegateRAState [virtual]Emit a .cfi_negate_ra_state directive.
emitCFINegateRAStateWithPC [virtual]Emit a .cfi_negate_ra_state_with_pc directive.
emitCFIOffset [virtual]Emit a .cfi_offset directive.
emitCFIPersonality [virtual]Emit a .cfi_personality directive.
emitCFIRegister [virtual]Emit a .cfi_register directive.
emitCFIRelOffset [virtual]Emit a .cfi_rel_offset directive.
emitCFIRememberState [virtual]Emit a .cfi_remember_state directive.
emitCFIRestore [virtual]Emit a .cfi_restore directive.
emitCFIRestoreState [virtual]Emit a .cfi_restore_state directive.
emitCFIReturnColumn [virtual]Emit a .cfi_return_column directive.
emitCFISameValue [virtual]Emit a .cfi_same_value directive.
emitCFISections [virtual]Select which CFI sections to emit.
emitCFISignalFrame [virtual]Emit a .cfi_signal_frame directive.
emitCFIStartProc Emit a .cfi_startproc directive.
emitCFIUndefined [virtual]Emit a .cfi_undefined directive.
emitCFIValOffset [virtual]Emit a .cfi_val_offset directive.
emitCFIWindowSave [virtual]Emit a .cfi_window_save directive.
emitCGProfileEntry [virtual]Emit a call-graph profile edge.
emitCOFFImgRel32 [virtual]Emits a COFF image relative relocation.
emitCOFFSafeSEH [virtual]Emit a COFF .safeseh directive for Symbol.
emitCOFFSecNumber [virtual]Emits the physical number of the section containing the given symbol as assigned during object writing (i.e., this is not a runtime relocation).
emitCOFFSecOffset [virtual]Emits the offset of the symbol from the beginning of the section during object writing (i.e., this is not a runtime relocation).
emitCOFFSecRel32 [virtual]Emits a COFF section relative relocation.
emitCOFFSectionIndex [virtual]Emits a COFF section index.
emitCOFFSymbolIndex [virtual]Emits the symbol table index of a Symbol into the current section.
emitCOFFSymbolStorageClass [virtual]Emit the storage class of the symbol.
emitCOFFSymbolType [virtual]Emit the type of the symbol.
emitCVDefRangeDirective emitCVDefRangeDirective overloads
emitCVFPOData [virtual]This implements the CodeView '.cv_fpo_data' assembler directive.
emitCVFileChecksumOffsetDirective [virtual]This implements the CodeView '.cv_filechecksumoffset' assembler directive.
emitCVFileChecksumsDirective [virtual]This implements the CodeView '.cv_filechecksums' assembler directive.
emitCVFileDirective [virtual]Associate a filename and checksum with a CodeView logical file number.
emitCVFuncIdDirective [virtual]Introduces a function id for use with .cv_loc.
emitCVInlineLinetableDirective [virtual]This implements the CodeView '.cv_inline_linetable' assembler directive.
emitCVInlineSiteIdDirective [virtual]Introduces an inline call site id for use with .cv_loc. Includes extra information for inline line table generation.
emitCVLinetableDirective [virtual]This implements the CodeView '.cv_linetable' assembler directive.
emitCVLocDirective [virtual]This implements the CodeView '.cv_loc' assembler directive.
emitCVStringTableDirective [virtual]This implements the CodeView '.cv_stringtable' assembler directive.
emitCodeAlignment [virtual]Emit nops until the byte alignment ByteAlignment is reached.
emitCommonSymbol [virtual]Emit a common symbol.
emitConditionalAssignment [virtual]Emit an assignment of Value to Symbol, but only if Value is also emitted.
emitDarwinTargetVariantBuildVersion [virtual]Emit a Mach-O build-version command for the Darwin target variant.
emitDataRegion [virtual]Note in the output the specified region Kind.
emitDwarfAdvanceLineAddr [virtual]Emit a raw DWARF line-address advance from LastLabel to Label.
emitDwarfFile0Directive [virtual]Specify the "root" file of the compilation, using the ".file 0" extension.
emitDwarfFileDirective Associate a filename with a specified logical file number. This implements the DWARF2 '.file 4 "foo.c"' assembler directive.
emitDwarfLineEndEntry [virtual]Emit the debug line end entry.
emitDwarfLineStartLabel [virtual]Emit the debug line start label.
emitDwarfLocDirective [virtual]This implements the DWARF2 '.loc fileno lineno ...' assembler directive.
emitDwarfLocDirectiveWithInlinedAt [virtual]This is same as emitDwarfLocDirective, except it has the capability to add inlined_at information.
emitDwarfLocLabelDirective [virtual]This implements the '.loc_label Name' directive.
emitDwarfUnitLength emitDwarfUnitLength overloads
emitEHSymAttributes [virtual]Copy EH-related symbol attributes from Symbol to EHSymbol.
emitELFSize [virtual]Emit an ELF .size directive.
emitELFSymverDirective [virtual]Emit an ELF .symver directive.
emitExplicitComments [virtual]Emit added explicit comments.
emitFileDirective emitFileDirective overloads
emitFill emitFill overloads
emitGNUAttribute [virtual]Emit a .gnu_attribute directive.
emitIdent [virtual]Emit the "identifiers" directive. This implements the '.ident "version foo"' assembler directive.
emitInstruction [virtual]Emit the given Instruction into the current section.
emitInt16 Emit Value as a two-byte integer.
emitInt32 Emit Value as a four-byte integer.
emitInt64 Emit Value as an eight-byte integer.
emitInt8 Emit Value as a one-byte integer.
emitIntValue emitIntValue overloads
emitIntValueInHex [virtual]Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers & prints in Hex format for certain modes.
emitIntValueInHexWithPadding [virtual]Emit a constant integer in hex, padded to Size bytes.
emitLOHDirective [virtual]Emit a Linker Optimization Hint (LOH) directive.
emitLabel [virtual]Emit a label for Symbol into the current section.
emitLineTableLabel Emit a temporary label and record it in the DWARF line table.
emitLinkerOptions [virtual]Emit the given list Options of strings as linker options into the output.
emitLocalCommonSymbol [virtual]Emit a local common (.lcomm) symbol.
emitNops [virtual]Emit NumBytes bytes of NOP instructions.
emitPrefAlign [virtual]Align up to A using NOPs or fill, not past symbol End.
emitPseudoProbe [virtual]Emit the a pseudo probe into the current section.
emitRawComment [virtual]Print T immediately as a comment, optionally tab-prefixed.
emitRawText Dump String into the output assembly file.
emitRelocDirective [virtual]Record a relocation described by the .reloc directive.
emitSLEB128IntValue Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers.
emitSLEB128Value [virtual]Emit Value encoded as signed LEB128.
emitSubsectionsViaSymbols [virtual]Emit a .subsection_via_symbols directive.
emitSymbolAttribute [virtual]Add the given Attribute to Symbol.
emitSymbolDesc [virtual]Set the DescValue for the Symbol.
emitSymbolValue Special case of EmitValue that avoids the client having to pass in a MCExpr for MCSymbols.
emitSyntaxDirective [virtual]Emit a .{Syntax}_syntax directive, such as .intel_syntax.
emitTBSSSymbol [virtual]Emit a thread local bss (.tbss) symbol.
emitTargetTriple [virtual]Emit the target triple into the output.
emitULEB128IntValue Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers.
emitULEB128Value [virtual]Emit Value encoded as unsigned LEB128.
emitValue Emit the expression Value as a native integer of Size bytes.
emitValueImpl [virtual]Emit the expression Value into the output as a native integer of the given Size bytes.
emitValueToAlignment [virtual]Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
emitValueToOffset [virtual]Emit some number of copies of Value until the byte offset Offset is reached.
emitVersionForTarget Emit version directives appropriate for Target.
emitVersionMin [virtual]Specify the Mach-O minimum deployment target version.
emitWeakReference [virtual]Emit an weak reference from Alias to Symbol.
emitWinCFIAllocStack [virtual]Emit a .seh_stackalloc directive.
emitWinCFIBeginEpilogue [virtual]Emit a .seh_startepilogue directive.
emitWinCFIEndEpilogue [virtual]Emit a .seh_endepilogue directive.
emitWinCFIEndProc [virtual]Emit a .seh_endproc directive ending a Windows CFI procedure.
emitWinCFIEndProlog [virtual]Emit a .seh_endprologue directive.
emitWinCFIFuncletOrFuncEnd [virtual]Emit a .seh_endfunclet directive for .xdata sizing.
emitWinCFIPush2Regs [virtual]Emit a .seh_push2regs directive.
emitWinCFIPushFrame [virtual]Emit a .seh_pushframe directive.
emitWinCFIPushReg [virtual]Emit a .seh_pushreg directive.
emitWinCFISaveReg [virtual]Emit a .seh_savereg directive.
emitWinCFISaveXMM [virtual]Emit a .seh_savexmm directive.
emitWinCFISetFrame [virtual]Emit a .seh_setframe directive.
emitWinCFISplitChained [virtual]Emit a .seh_splitchained directive.
emitWinCFIStartProc [virtual]Emit a .seh_proc directive starting a Windows CFI procedure.
emitWinCFIUnwindV2Start [virtual]Emit a .seh_unwindv2start directive.
emitWinCFIUnwindVersion [virtual]Emit a .seh_unwindversion directive.
emitWinEHHandler [virtual]Emit a .seh_handler directive.
emitWinEHHandlerData [virtual]Emit a .seh_handlerdata directive.
emitXCOFFCInfoSym [virtual]Emit a C_INFO symbol with XCOFF embedded metadata to the .info section.
emitXCOFFExceptDirective [virtual]Emit an XCOFF .except directive which adds information about a trap instruction to the object file exception section
emitXCOFFLocalCommonSymbol [virtual]Emits an lcomm directive with XCOFF csect information.
emitXCOFFRefDirective [virtual]Emit a XCOFF .ref directive which creates R_REF type entry in the relocation table for one or more symbols.
emitXCOFFRenameDirective [virtual]Emit a XCOFF .rename directive which creates a synonym for an illegal or undesirable name.
emitXCOFFSymbolLinkageWithVisibility [virtual]Emit a symbol's linkage and visibility with a linkage directive for XCOFF.
emitZerofill [virtual]Emit the zerofill section and an optional symbol.
emitZeros Emit NumBytes worth of zeros. This function properly handles data in virtual sections.
endCOFFSymbolDef [virtual]Marks the end of the symbol definition.
endSection End Section and return its end symbol.
finish Finish emission of machine code.
finishImpl [virtual]Streamer specific finalization.
getAllowAutoPadding Return whether the assembler may insert padding automatically.
getAssembler Return the assembler used by this streamer.
getAssemblerPtr [virtual]Return the assembler, or null if this streamer has none.
getAssociatedPDataSection Return the .pdata section associated with TextSec.
getAssociatedXDataSection Get the .xdata section used for the given section.
getCommentOS [virtual]Return a raw_ostream that comments can be written to. Unlike AddComment, you are required to terminate comments with if you use this method.
getContext Return the MC context this streamer is bound to.
getCurFragSize Return the fixed size of the current data fragment.
getCurrentFragment Return the fragment currently being appended to.
getCurrentSection Return the current section that the streamer is emitting code to.
getCurrentSectionOnly Return only the current section, ignoring the subsection index.
getCurrentWinEpilog Return the Windows EH epilog currently being processed, or null.
getDefaultWinCFIUnwindVersion Return the default unwind version for new WinCFI frames.
getDwarfFrameInfos Return the collected DWARF CFI frames.
getDwarfLineTableSymbol [virtual]Return the DWARF line-table symbol for compile unit CUID.
getLFIRewriter Return the installed LFI rewriter, or null if none.
getMnemonic [virtual]Returns the mnemonic for MI, if the streamer has access to a instruction printer and returns an empty string otherwise.
getNumFrameInfos Return the number of DWARF CFI frames collected so far.
getNumWinFrameInfos Return the number of Windows EH frames collected so far.
getPreviousSection Return the previous section that the streamer is emitting code to.
getStartTokLoc Return the parser's current token location, if available.
getTargetStreamer Return the attached target streamer, or null if none.
getUseAssemblerInfoForParsing Return whether assembler info may be used during parsing.
getWinFrameInfos Return the collected Windows EH frames.
hasRawTextSupport [virtual]Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText.
hasUnfinishedDwarfFrameInfo Return true if a DWARF CFI frame has been started but not ended.
initSections [virtual]Create the default sections and set the initial one.
isInEpilogCFI Return true if SEH directives are being recorded for an epilog.
isIntegratedAssemblerRequired [virtual]Is the integrated assembler required for this streamer to function correctly?
isObj Return true if this streamer emits an object file.
isVerboseAsm [virtual]Return true if this streamer supports verbose assembly and if it is enabled.
isWinCFIPrologEnded Returns true if a WinCFI prolog has been completed (.seh_endprologue) in the current frame.
mayHaveInstructions [virtual]Return true if Sec may contain instructions.
maybeEmitDwarf64Mark Emit a special value of 0xffffffff if producing 64-bit debugging info.
popSection [virtual]Restore the current and previous section from the section stack. Calls changeSection as needed.
pushSection Save the current and previous section on the section stack.
reset [virtual]State management
setAllowAutoPadding Set whether the assembler may insert padding automatically.
setDefaultWinCFIUnwindVersion Set the default unwind version for new WinCFI frames.
setLFIRewriter Take ownership of LFI rewriter Rewriter.
setStartTokLocPtr Point at the parser's current token location for diagnostics.
setTargetStreamer Take ownership of target streamer TS.
setUseAssemblerInfoForParsing Set whether assembler info may be used during parsing.
switchSection switchSection overloads
switchSectionNoPrint Similar to switchSection, but does not print the section directive.
tryEmitDwarfFileDirective [virtual]Associate a filename with a specified logical file number.
visitUsedExpr Visit symbols referenced by Expr.
visitUsedSymbol [virtual]Visit a symbol used by a streamed expression or directive.

Protected Member Functions

NameDescription
MCAsmBaseStreamer [constructor]Construct an assembly base streamer.
addFragment Append fragment F to the current section.
changeSection [virtual]This is called by popSection and switchSection, if the current section changes.
checkCVLocSection Returns true if the .cv_loc directive is in the right section.
emitCFIEndProcImpl [virtual]Target-specific implementation of .cfi_endproc.
emitCFIStartProcImpl [virtual]Target-specific implementation of .cfi_startproc.
emitRawTextImpl [virtual]Implementation of emitRawText, used by assembly streamers.
emitWindowsUnwindTables emitWindowsUnwindTables overloads
getCurrentWinFrameInfo Return the current Windows EH frame, or null if none is active.

Protected Data Members

NameDescription
Assembler Assembler used by this streamer for encoding and layout.
CommentStream Stream that appends comment text into CommentToEmit.
CommentToEmit Buffer holding comments pending emission.
CurFrag Fragment currently being appended to.
CurrentWinEpilog Symbol of the current epilog for which we are processing SEH directives.
DwarfFrameInfos DWARF CFI frames collected while streaming.
IsObj True if this streamer is emitting an object file rather than assembly.
LFIRewriter Optional LFI rewriter applied to emitted instructions.
NullStream Discarding stream used when an object writer must be created.

Non-Member Functions

NameDescription
emitLFIBundleAlignEmit LFI bundle-alignment mode for the current target, if required.
emitLFINoteSectionEmit the ELF note section that identifies an LFI object file.
initializeLFIMCStreamerInitialize Streamer with LFI rewriting support for TheTriple.
mcdwarf::emitListsTableHeaderStartEmit the common part of the DWARF 5 range/locations list tables header.