LLVM  8.0.1
Public Member Functions | Protected Member Functions | List of all members
llvm::MCStreamer Class Referenceabstract

Streaming machine code generation interface. More...

#include "llvm/MC/MCStreamer.h"

Inheritance diagram for llvm::MCStreamer:
Inheritance graph
[legend]

Public Member Functions

 MCStreamer (const MCStreamer &)=delete
 
MCStreameroperator= (const MCStreamer &)=delete
 
virtual ~MCStreamer ()
 
void visitUsedExpr (const MCExpr &Expr)
 
virtual void visitUsedSymbol (const MCSymbol &Sym)
 
void setTargetStreamer (MCTargetStreamer *TS)
 
virtual void reset ()
 State management. More...
 
MCContextgetContext () const
 
virtual MCAssemblergetAssemblerPtr ()
 
void setUseAssemblerInfoForParsing (bool v)
 
bool getUseAssemblerInfoForParsing ()
 
MCTargetStreamergetTargetStreamer ()
 
virtual MCSymbolEmitCFILabel ()
 When emitting an object file, create and emit a real label. More...
 
WinEH::FrameInfoEnsureValidWinFrameInfo (SMLoc Loc)
 Retreive the current frame info if one is available and it is not yet closed. More...
 
unsigned getNumFrameInfos ()
 
ArrayRef< MCDwarfFrameInfogetDwarfFrameInfos () const
 
bool hasUnfinishedDwarfFrameInfo ()
 
unsigned getNumWinFrameInfos ()
 
ArrayRef< std::unique_ptr< WinEH::FrameInfo > > getWinFrameInfos () const
 
void generateCompactUnwindEncodings (MCAsmBackend *MAB)
 
virtual void EmitFileDirective (StringRef Filename)
 Switch to a new logical file. More...
 
virtual void EmitIdent (StringRef IdentString)
 Emit the "identifiers" directive. More...
 
unsigned EmitDwarfFileDirective (unsigned FileNo, StringRef Directory, StringRef Filename, MD5::MD5Result *Checksum=nullptr, Optional< StringRef > Source=None, unsigned CUID=0)
 Associate a filename with a specified logical file number. More...
 
virtual Expected< unsignedtryEmitDwarfFileDirective (unsigned FileNo, StringRef Directory, StringRef Filename, MD5::MD5Result *Checksum=nullptr, Optional< StringRef > Source=None, unsigned CUID=0)
 Associate a filename with a specified logical file number. More...
 
virtual void emitDwarfFile0Directive (StringRef Directory, StringRef Filename, MD5::MD5Result *Checksum, Optional< StringRef > Source, unsigned CUID=0)
 Specify the "root" file of the compilation, using the ".file 0" extension. More...
 
virtual void EmitCFIBKeyFrame ()
 
virtual void EmitDwarfLocDirective (unsigned FileNo, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator, StringRef FileName)
 This implements the DWARF2 '.loc fileno lineno ...' assembler directive. More...
 
virtual bool EmitCVFileDirective (unsigned FileNo, StringRef Filename, ArrayRef< uint8_t > Checksum, unsigned ChecksumKind)
 Associate a filename with a specified logical file number, and also specify that file's checksum information. More...
 
virtual bool EmitCVFuncIdDirective (unsigned FunctionId)
 Introduces a function id for use with .cv_loc. More...
 
virtual bool EmitCVInlineSiteIdDirective (unsigned FunctionId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol, SMLoc Loc)
 Introduces an inline call site id for use with .cv_loc. More...
 
virtual void EmitCVLocDirective (unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName, SMLoc Loc)
 This implements the CodeView '.cv_loc' assembler directive. More...
 
virtual void EmitCVLinetableDirective (unsigned FunctionId, const MCSymbol *FnStart, const MCSymbol *FnEnd)
 This implements the CodeView '.cv_linetable' assembler directive. More...
 
virtual void EmitCVInlineLinetableDirective (unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym)
 This implements the CodeView '.cv_inline_linetable' assembler directive. More...
 
virtual void EmitCVDefRangeDirective (ArrayRef< std::pair< const MCSymbol *, const MCSymbol *>> Ranges, StringRef FixedSizePortion)
 This implements the CodeView '.cv_def_range' assembler directive. More...
 
virtual void EmitCVStringTableDirective ()
 This implements the CodeView '.cv_stringtable' assembler directive. More...
 
virtual void EmitCVFileChecksumsDirective ()
 This implements the CodeView '.cv_filechecksums' assembler directive. More...
 
virtual void EmitCVFileChecksumOffsetDirective (unsigned FileNo)
 This implements the CodeView '.cv_filechecksumoffset' assembler directive. More...
 
virtual void EmitCVFPOData (const MCSymbol *ProcSym, SMLoc Loc={})
 This implements the CodeView '.cv_fpo_data' assembler directive. More...
 
virtual void emitAbsoluteSymbolDiff (const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size)
 Emit the absolute difference between two symbols. More...
 
virtual void emitAbsoluteSymbolDiffAsULEB128 (const MCSymbol *Hi, const MCSymbol *Lo)
 Emit the absolute difference between two symbols encoded with ULEB128. More...
 
virtual MCSymbolgetDwarfLineTableSymbol (unsigned CUID)
 
virtual void EmitCFISections (bool EH, bool Debug)
 
void EmitCFIStartProc (bool IsSimple, SMLoc Loc=SMLoc())
 
void EmitCFIEndProc ()
 
virtual void EmitCFIDefCfa (int64_t Register, int64_t Offset)
 
virtual void EmitCFIDefCfaOffset (int64_t Offset)
 
virtual void EmitCFIDefCfaRegister (int64_t Register)
 
virtual void EmitCFIOffset (int64_t Register, int64_t Offset)
 
virtual void EmitCFIPersonality (const MCSymbol *Sym, unsigned Encoding)
 
virtual void EmitCFILsda (const MCSymbol *Sym, unsigned Encoding)
 
virtual void EmitCFIRememberState ()
 
virtual void EmitCFIRestoreState ()
 
virtual void EmitCFISameValue (int64_t Register)
 
virtual void EmitCFIRestore (int64_t Register)
 
virtual void EmitCFIRelOffset (int64_t Register, int64_t Offset)
 
virtual void EmitCFIAdjustCfaOffset (int64_t Adjustment)
 
virtual void EmitCFIEscape (StringRef Values)
 
virtual void EmitCFIReturnColumn (int64_t Register)
 
virtual void EmitCFIGnuArgsSize (int64_t Size)
 
virtual void EmitCFISignalFrame ()
 
virtual void EmitCFIUndefined (int64_t Register)
 
virtual void EmitCFIRegister (int64_t Register1, int64_t Register2)
 
virtual void EmitCFIWindowSave ()
 
virtual void EmitCFINegateRAState ()
 
virtual void EmitWinCFIStartProc (const MCSymbol *Symbol, SMLoc Loc=SMLoc())
 
virtual void EmitWinCFIEndProc (SMLoc Loc=SMLoc())
 
virtual void EmitWinCFIFuncletOrFuncEnd (SMLoc Loc=SMLoc())
 This is used on platforms, such as Windows on ARM64, that require function or funclet sizes to be emitted in .xdata before the End marker is emitted for the frame. More...
 
virtual void EmitWinCFIStartChained (SMLoc Loc=SMLoc())
 
virtual void EmitWinCFIEndChained (SMLoc Loc=SMLoc())
 
virtual void EmitWinCFIPushReg (unsigned Register, SMLoc Loc=SMLoc())
 
virtual void EmitWinCFISetFrame (unsigned Register, unsigned Offset, SMLoc Loc=SMLoc())
 
virtual void EmitWinCFIAllocStack (unsigned Size, SMLoc Loc=SMLoc())
 
virtual void EmitWinCFISaveReg (unsigned Register, unsigned Offset, SMLoc Loc=SMLoc())
 
virtual void EmitWinCFISaveXMM (unsigned Register, unsigned Offset, SMLoc Loc=SMLoc())
 
virtual void EmitWinCFIPushFrame (bool Code, SMLoc Loc=SMLoc())
 
virtual void EmitWinCFIEndProlog (SMLoc Loc=SMLoc())
 
virtual void EmitWinEHHandler (const MCSymbol *Sym, bool Unwind, bool Except, SMLoc Loc=SMLoc())
 
virtual void EmitWinEHHandlerData (SMLoc Loc=SMLoc())
 
virtual void emitCGProfileEntry (const MCSymbolRefExpr *From, const MCSymbolRefExpr *To, uint64_t Count)
 
MCSectiongetAssociatedPDataSection (const MCSection *TextSec)
 Get the .pdata section used for the given section. More...
 
MCSectiongetAssociatedXDataSection (const MCSection *TextSec)
 Get the .xdata section used for the given section. More...
 
virtual void EmitSyntaxDirective ()
 
virtual bool EmitRelocDirective (const MCExpr &Offset, StringRef Name, const MCExpr *Expr, SMLoc Loc, const MCSubtargetInfo &STI)
 Emit a .reloc directive. More...
 
virtual void EmitAddrsig ()
 
virtual void EmitAddrsigSym (const MCSymbol *Sym)
 
virtual void EmitInstruction (const MCInst &Inst, const MCSubtargetInfo &STI, bool PrintSchedInfo=false)
 Emit the given Instruction into the current section. More...
 
virtual void EmitBundleAlignMode (unsigned AlignPow2)
 Set the bundle alignment mode from now on in the section. More...
 
virtual void EmitBundleLock (bool AlignToEnd)
 The following instructions are a bundle-locked group. More...
 
virtual void EmitBundleUnlock ()
 Ends a bundle-locked group. More...
 
void EmitRawText (const Twine &String)
 If this file is backed by a assembly streamer, this dumps the specified string in the output .s file. More...
 
virtual void FinishImpl ()
 Streamer specific finalization. More...
 
void Finish ()
 Finish emission of machine code. More...
 
virtual bool mayHaveInstructions (MCSection &Sec) const
 
Assembly File Formatting.
virtual bool isVerboseAsm () const
 Return true if this streamer supports verbose assembly and if it is enabled. More...
 
virtual bool hasRawTextSupport () const
 Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText. More...
 
virtual bool isIntegratedAssemblerRequired () const
 Is the integrated assembler required for this streamer to function correctly? More...
 
virtual void AddComment (const Twine &T, bool EOL=true)
 Add a textual comment. More...
 
virtual raw_ostreamGetCommentOS ()
 Return a raw_ostream that comments can be written to. More...
 
virtual void emitRawComment (const Twine &T, bool TabPrefix=true)
 Print T and prefix it with the comment string (normally #) and optionally a tab. More...
 
virtual void addExplicitComment (const Twine &T)
 Add explicit comment T. More...
 
virtual void emitExplicitComments ()
 Emit added explicit comments. More...
 
virtual void AddBlankLine ()
 AddBlankLine - Emit a blank line to a .s file to pretty it up. More...
 
Symbol & Section Management
MCSectionSubPair getCurrentSection () const
 Return the current section that the streamer is emitting code to. More...
 
MCSectiongetCurrentSectionOnly () const
 
MCSectionSubPair getPreviousSection () const
 Return the previous section that the streamer is emitting code to. More...
 
unsigned GetSymbolOrder (const MCSymbol *Sym) const
 Returns an index to represent the order a symbol was emitted in. More...
 
virtual void ChangeSection (MCSection *, const MCExpr *)
 Update streamer for a new active section. More...
 
void PushSection ()
 Save the current and previous section on the section stack. More...
 
bool PopSection ()
 Restore the current and previous section from the section stack. More...
 
bool SubSection (const MCExpr *Subsection)
 
virtual void SwitchSection (MCSection *Section, const MCExpr *Subsection=nullptr)
 Set the current section where code is being emitted to Section. More...
 
void SwitchSectionNoChange (MCSection *Section, const MCExpr *Subsection=nullptr)
 Set the current section where code is being emitted to Section. More...
 
virtual void InitSections (bool NoExecStack)
 Create the default sections and set the initial one. More...
 
MCSymbolendSection (MCSection *Section)
 
void AssignFragment (MCSymbol *Symbol, MCFragment *Fragment)
 Sets the symbol's section. More...
 
virtual void EmitLabel (MCSymbol *Symbol, SMLoc Loc=SMLoc())
 Emit a label for Symbol into the current section. More...
 
virtual void EmitEHSymAttributes (const MCSymbol *Symbol, MCSymbol *EHSymbol)
 
virtual void EmitAssemblerFlag (MCAssemblerFlag Flag)
 Note in the output the specified Flag. More...
 
virtual void EmitLinkerOptions (ArrayRef< std::string > Kind)
 Emit the given list Options of strings as linker options into the output. More...
 
virtual void EmitDataRegion (MCDataRegionType Kind)
 Note in the output the specified region Kind. More...
 
virtual void EmitVersionMin (MCVersionMinType Type, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)
 Specify the Mach-O minimum deployment target version. More...
 
virtual void EmitBuildVersion (unsigned Platform, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)
 Emit/Specify Mach-O build version command. More...
 
void EmitVersionForTarget (const Triple &Target, const VersionTuple &SDKVersion)
 
virtual void EmitThumbFunc (MCSymbol *Func)
 Note in the output that the specified Func is a Thumb mode function (ARM target only). More...
 
virtual void EmitAssignment (MCSymbol *Symbol, const MCExpr *Value)
 Emit an assignment of Value to Symbol. More...
 
virtual void EmitWeakReference (MCSymbol *Alias, const MCSymbol *Symbol)
 Emit an weak reference from Alias to Symbol. More...
 
virtual bool EmitSymbolAttribute (MCSymbol *Symbol, MCSymbolAttr Attribute)=0
 Add the given Attribute to Symbol. More...
 
virtual void EmitSymbolDesc (MCSymbol *Symbol, unsigned DescValue)
 Set the DescValue for the Symbol. More...
 
virtual void BeginCOFFSymbolDef (const MCSymbol *Symbol)
 Start emitting COFF symbol definition. More...
 
virtual void EmitCOFFSymbolStorageClass (int StorageClass)
 Emit the storage class of the symbol. More...
 
virtual void EmitCOFFSymbolType (int Type)
 Emit the type of the symbol. More...
 
virtual void EndCOFFSymbolDef ()
 Marks the end of the symbol definition. More...
 
virtual void EmitCOFFSafeSEH (MCSymbol const *Symbol)
 
virtual void EmitCOFFSymbolIndex (MCSymbol const *Symbol)
 Emits the symbol table index of a Symbol into the current section. More...
 
virtual void EmitCOFFSectionIndex (MCSymbol const *Symbol)
 Emits a COFF section index. More...
 
virtual void EmitCOFFSecRel32 (MCSymbol const *Symbol, uint64_t Offset)
 Emits a COFF section relative relocation. More...
 
virtual void EmitCOFFImgRel32 (MCSymbol const *Symbol, int64_t Offset)
 Emits a COFF image relative relocation. More...
 
virtual void emitELFSize (MCSymbol *Symbol, const MCExpr *Value)
 Emit an ELF .size directive. More...
 
virtual void emitELFSymverDirective (StringRef AliasName, const MCSymbol *Aliasee)
 Emit an ELF .symver directive. More...
 
virtual void EmitLOHDirective (MCLOHType Kind, const MCLOHArgs &Args)
 Emit a Linker Optimization Hint (LOH) directive. More...
 
virtual void EmitCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)=0
 Emit a common symbol. More...
 
virtual void EmitLocalCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)
 Emit a local common (.lcomm) symbol. More...
 
virtual void EmitZerofill (MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, unsigned ByteAlignment=0, SMLoc Loc=SMLoc())=0
 Emit the zerofill section and an optional symbol. More...
 
virtual void EmitTBSSSymbol (MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment=0)
 Emit a thread local bss (.tbss) symbol. More...
 
Generating Data
virtual void EmitBytes (StringRef Data)
 Emit the bytes in Data into the output. More...
 
virtual void EmitBinaryData (StringRef Data)
 Functionally identical to EmitBytes. More...
 
virtual void EmitValueImpl (const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
 Emit the expression Value into the output as a native integer of the given Size bytes. More...
 
void EmitValue (const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
 
virtual void EmitIntValue (uint64_t Value, unsigned Size)
 Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers. More...
 
virtual void EmitULEB128Value (const MCExpr *Value)
 
virtual void EmitSLEB128Value (const MCExpr *Value)
 
void EmitULEB128IntValue (uint64_t Value)
 Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers. More...
 
void EmitSLEB128IntValue (int64_t Value)
 Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers. More...
 
void EmitSymbolValue (const MCSymbol *Sym, unsigned Size, bool IsSectionRelative=false)
 Special case of EmitValue that avoids the client having to pass in a MCExpr for MCSymbols. More...
 
virtual void EmitDTPRel64Value (const MCExpr *Value)
 Emit the expression Value into the output as a dtprel (64-bit DTP relative) value. More...
 
virtual void EmitDTPRel32Value (const MCExpr *Value)
 Emit the expression Value into the output as a dtprel (32-bit DTP relative) value. More...
 
virtual void EmitTPRel64Value (const MCExpr *Value)
 Emit the expression Value into the output as a tprel (64-bit TP relative) value. More...
 
virtual void EmitTPRel32Value (const MCExpr *Value)
 Emit the expression Value into the output as a tprel (32-bit TP relative) value. More...
 
virtual void EmitGPRel64Value (const MCExpr *Value)
 Emit the expression Value into the output as a gprel64 (64-bit GP relative) value. More...
 
virtual void EmitGPRel32Value (const MCExpr *Value)
 Emit the expression Value into the output as a gprel32 (32-bit GP relative) value. More...
 
void emitFill (uint64_t NumBytes, uint8_t FillValue)
 Emit NumBytes bytes worth of the value specified by FillValue. More...
 
virtual void emitFill (const MCExpr &NumBytes, uint64_t FillValue, SMLoc Loc=SMLoc())
 Emit Size bytes worth of the value specified by FillValue. More...
 
virtual void emitFill (const MCExpr &NumValues, int64_t Size, int64_t Expr, SMLoc Loc=SMLoc())
 Emit NumValues copies of Size bytes. More...
 
void EmitZeros (uint64_t NumBytes)
 Emit NumBytes worth of zeros. More...
 
virtual void EmitValueToAlignment (unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)
 Emit some number of copies of Value until the byte alignment ByteAlignment is reached. More...
 
virtual void EmitCodeAlignment (unsigned ByteAlignment, unsigned MaxBytesToEmit=0)
 Emit nops until the byte alignment ByteAlignment is reached. More...
 
virtual void emitValueToOffset (const MCExpr *Offset, unsigned char Value, SMLoc Loc)
 Emit some number of copies of Value until the byte offset Offset is reached. More...
 
virtual void EmitCodePaddingBasicBlockStart (const MCCodePaddingContext &Context)
 
virtual void EmitCodePaddingBasicBlockEnd (const MCCodePaddingContext &Context)
 

Protected Member Functions

 MCStreamer (MCContext &Ctx)
 
virtual void EmitCFIStartProcImpl (MCDwarfFrameInfo &Frame)
 
virtual void EmitCFIEndProcImpl (MCDwarfFrameInfo &CurFrame)
 
WinEH::FrameInfogetCurrentWinFrameInfo ()
 
virtual void EmitWindowsUnwindTables ()
 
virtual void EmitRawTextImpl (StringRef String)
 EmitRawText - If this file is backed by an assembly streamer, this dumps the specified string in the output .s file. More...
 
bool checkCVLocSection (unsigned FuncId, unsigned FileNo, SMLoc Loc)
 Returns true if the the .cv_loc directive is in the right section. More...
 

Detailed Description

Streaming machine code generation interface.

This interface is intended to provide a programatic interface that is very similar to the level that an assembler .s file provides. It has callbacks to emit bytes, handle directives, etc. The implementation of this interface retains state to know what the current section is etc.

There are multiple implementations of this interface: one for writing out a .s file, and implementations that write out .o files of various formats.

Definition at line 189 of file MCStreamer.h.

Constructor & Destructor Documentation

◆ MCStreamer() [1/2]

MCStreamer::MCStreamer ( MCContext Ctx)
protected

◆ MCStreamer() [2/2]

llvm::MCStreamer::MCStreamer ( const MCStreamer )
delete

◆ ~MCStreamer()

MCStreamer::~MCStreamer ( )
virtual

Definition at line 95 of file MCStreamer.cpp.

Member Function Documentation

◆ AddBlankLine()

virtual void llvm::MCStreamer::AddBlankLine ( )
inlinevirtual

◆ AddComment()

virtual void llvm::MCStreamer::AddComment ( const Twine T,
bool  EOL = true 
)
inlinevirtual

Add a textual comment.

Typically for comments that can be emitted to the generated .s file if applicable as a QoI issue to make the output of the compiler more readable. This only affects the MCAsmStreamer, and only when verbose assembly output is enabled.

If the comment includes embedded
's, they will each get the comment prefix as appropriate. The added comment should not end with a
. By default, each comment is terminated with an end of line, i.e. the EOL param is set to true by default. If one prefers not to end the comment with a new line then the EOL param should be passed with a false value.

Definition at line 312 of file MCStreamer.h.

Referenced by llvm::BTFDebug::BTFDebug(), llvm::X86AsmPrinter::EmitInstruction(), llvm::CodeViewContext::emitLineTableForFunction(), EmitNops(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::BTFTypeBase::emitType(), llvm::BTFTypeInt::emitType(), and llvm::BTFTypeStruct::emitType().

◆ addExplicitComment()

void MCStreamer::addExplicitComment ( const Twine T)
virtual

Add explicit comment T.

T is required to be a valid comment in the output and does not need to be escaped.

Definition at line 113 of file MCStreamer.cpp.

◆ AssignFragment()

void MCStreamer::AssignFragment ( MCSymbol Symbol,
MCFragment Fragment 
)

Sets the symbol's section.

Each emitted symbol will be tracked in the ordering table, so we can sort on them later.

Definition at line 338 of file MCStreamer.cpp.

References assert(), llvm::MCSymbol::setFragment(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), and llvm::ARMBuildAttrs::Symbol.

◆ BeginCOFFSymbolDef()

void MCStreamer::BeginCOFFSymbolDef ( const MCSymbol Symbol)
virtual

Start emitting COFF symbol definition.

Parameters
Symbol- The symbol to have its External & Type fields set.

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 996 of file MCStreamer.cpp.

References llvm_unreachable.

◆ ChangeSection()

void MCStreamer::ChangeSection ( MCSection ,
const MCExpr  
)
virtual

Update streamer for a new active section.

This is called by PopSection and SwitchSection, if the current section changes.

Reimplemented in llvm::MCObjectStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.

Definition at line 1016 of file MCStreamer.cpp.

Referenced by SwitchSection().

◆ checkCVLocSection()

bool MCStreamer::checkCVLocSection ( unsigned  FuncId,
unsigned  FileNo,
SMLoc  Loc 
)
protected

◆ emitAbsoluteSymbolDiff()

void MCStreamer::emitAbsoluteSymbolDiff ( const MCSymbol Hi,
const MCSymbol Lo,
unsigned  Size 
)
virtual

◆ emitAbsoluteSymbolDiffAsULEB128()

void MCStreamer::emitAbsoluteSymbolDiffAsULEB128 ( const MCSymbol Hi,
const MCSymbol Lo 
)
virtual

Emit the absolute difference between two symbols encoded with ULEB128.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 983 of file MCStreamer.cpp.

References llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), and EmitULEB128Value().

Referenced by llvm::MCObjectStreamer::emitAbsoluteSymbolDiffAsULEB128().

◆ EmitAddrsig()

virtual void llvm::MCStreamer::EmitAddrsig ( )
inlinevirtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 952 of file MCStreamer.h.

◆ EmitAddrsigSym()

virtual void llvm::MCStreamer::EmitAddrsigSym ( const MCSymbol Sym)
inlinevirtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 953 of file MCStreamer.h.

◆ EmitAssemblerFlag()

void MCStreamer::EmitAssemblerFlag ( MCAssemblerFlag  Flag)
virtual

Note in the output the specified Flag.

Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 993 of file MCStreamer.cpp.

◆ EmitAssignment()

void MCStreamer::EmitAssignment ( MCSymbol Symbol,
const MCExpr Value 
)
virtual

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.

Parameters
Symbol- The symbol being assigned to.
Value- The value for the symbol.

Reimplemented in llvm::MCObjectStreamer, and llvm::RecordStreamer.

Definition at line 912 of file MCStreamer.cpp.

References llvm::MCTargetStreamer::emitAssignment(), getTargetStreamer(), llvm::MCSymbol::setVariableValue(), and visitUsedExpr().

Referenced by emitAbsoluteSymbolDiff(), llvm::RecordStreamer::EmitAssignment(), llvm::MCObjectStreamer::EmitAssignment(), llvm::RecordStreamer::flushSymverDirectives(), forceExpAbs(), getPlatformName(), isOperator(), and llvm::MCContext::setSymbolValue().

◆ EmitBinaryData()

void MCStreamer::EmitBinaryData ( StringRef  Data)
virtual

Functionally identical to EmitBytes.

When emitting textual assembly, this method uses .byte directives instead of .ascii or .asciz for readability.

Definition at line 1019 of file MCStreamer.cpp.

References EmitBytes().

Referenced by llvm::AsmPrinter::XRayFunctionEntry::emit(), EmitNops(), emitOneV5FileEntry(), and llvm::MCDwarfLineStr::emitSection().

◆ EmitBuildVersion()

virtual void llvm::MCStreamer::EmitBuildVersion ( unsigned  Platform,
unsigned  Major,
unsigned  Minor,
unsigned  Update,
VersionTuple  SDKVersion 
)
inlinevirtual

Emit/Specify Mach-O build version command.

Platform should be one of MachO::PlatformType.

Definition at line 461 of file MCStreamer.h.

References StorageClass.

◆ EmitBundleAlignMode()

void MCStreamer::EmitBundleAlignMode ( unsigned  AlignPow2)
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 in llvm::MCObjectStreamer, and llvm::MCELFStreamer.

Definition at line 1035 of file MCStreamer.cpp.

◆ EmitBundleLock()

void MCStreamer::EmitBundleLock ( bool  AlignToEnd)
virtual

The following instructions are a bundle-locked group.

Parameters
AlignToEnd- If true, the bundle-locked group will be aligned to the end of a bundle.

Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.

Definition at line 1036 of file MCStreamer.cpp.

◆ EmitBundleUnlock()

void MCStreamer::EmitBundleUnlock ( )
virtual

Ends a bundle-locked group.

Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.

Definition at line 1038 of file MCStreamer.cpp.

◆ EmitBytes()

void MCStreamer::EmitBytes ( StringRef  Data)
virtual

◆ EmitCFIAdjustCfaOffset()

void MCStreamer::EmitCFIAdjustCfaOffset ( int64_t  Adjustment)
virtual

◆ EmitCFIBKeyFrame()

void MCStreamer::EmitCFIBKeyFrame ( )
virtual

Definition at line 224 of file MCStreamer.cpp.

References llvm::MCDwarfFrameInfo::IsBKeyFrame.

Referenced by PrintCFIEscape().

◆ EmitCFIDefCfa()

void MCStreamer::EmitCFIDefCfa ( int64_t  Register,
int64_t  Offset 
)
virtual

◆ EmitCFIDefCfaOffset()

void MCStreamer::EmitCFIDefCfaOffset ( int64_t  Offset)
virtual

◆ EmitCFIDefCfaRegister()

void MCStreamer::EmitCFIDefCfaRegister ( int64_t  Register)
virtual

◆ EmitCFIEndProc()

void MCStreamer::EmitCFIEndProc ( )

Definition at line 394 of file MCStreamer.cpp.

References EmitCFIEndProcImpl().

◆ EmitCFIEndProcImpl()

void MCStreamer::EmitCFIEndProcImpl ( MCDwarfFrameInfo CurFrame)
protectedvirtual

Reimplemented in llvm::MipsELFStreamer.

Definition at line 401 of file MCStreamer.cpp.

References llvm::MCDwarfFrameInfo::End.

Referenced by EmitCFIEndProc(), and printDwarfFileDirective().

◆ EmitCFIEscape()

void MCStreamer::EmitCFIEscape ( StringRef  Values)
virtual

◆ EmitCFIGnuArgsSize()

void MCStreamer::EmitCFIGnuArgsSize ( int64_t  Size)
virtual

◆ EmitCFILabel()

MCSymbol * MCStreamer::EmitCFILabel ( )
virtual

◆ EmitCFILsda()

void MCStreamer::EmitCFILsda ( const MCSymbol Sym,
unsigned  Encoding 
)
virtual

Definition at line 484 of file MCStreamer.cpp.

References llvm::MCDwarfFrameInfo::Lsda, and llvm::MCDwarfFrameInfo::LsdaEncoding.

Referenced by PrintCFIEscape().

◆ EmitCFINegateRAState()

void MCStreamer::EmitCFINegateRAState ( )
virtual

◆ EmitCFIOffset()

void MCStreamer::EmitCFIOffset ( int64_t  Register,
int64_t  Offset 
)
virtual

◆ EmitCFIPersonality()

void MCStreamer::EmitCFIPersonality ( const MCSymbol Sym,
unsigned  Encoding 
)
virtual

◆ EmitCFIRegister()

void MCStreamer::EmitCFIRegister ( int64_t  Register1,
int64_t  Register2 
)
virtual

◆ EmitCFIRelOffset()

void MCStreamer::EmitCFIRelOffset ( int64_t  Register,
int64_t  Offset 
)
virtual

◆ EmitCFIRememberState()

void MCStreamer::EmitCFIRememberState ( )
virtual

◆ EmitCFIRestore()

void MCStreamer::EmitCFIRestore ( int64_t  Register)
virtual

◆ EmitCFIRestoreState()

void MCStreamer::EmitCFIRestoreState ( )
virtual

◆ EmitCFIReturnColumn()

void MCStreamer::EmitCFIReturnColumn ( int64_t  Register)
virtual

Definition at line 596 of file MCStreamer.cpp.

References llvm::MCDwarfFrameInfo::RAReg, and Register.

Referenced by PrintCFIEscape().

◆ EmitCFISameValue()

void MCStreamer::EmitCFISameValue ( int64_t  Register)
virtual

◆ EmitCFISections()

void MCStreamer::EmitCFISections ( bool  EH,
bool  Debug 
)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 365 of file MCStreamer.cpp.

References assert().

Referenced by llvm::MCObjectStreamer::EmitCFISections(), and printDwarfFileDirective().

◆ EmitCFISignalFrame()

void MCStreamer::EmitCFISignalFrame ( )
virtual

Definition at line 550 of file MCStreamer.cpp.

References llvm::MCDwarfFrameInfo::IsSignalFrame.

Referenced by PrintCFIEscape().

◆ EmitCFIStartProc()

void MCStreamer::EmitCFIStartProc ( bool  IsSimple,
SMLoc  Loc = SMLoc() 
)

◆ EmitCFIStartProcImpl()

void MCStreamer::EmitCFIStartProcImpl ( MCDwarfFrameInfo Frame)
protectedvirtual

Reimplemented in llvm::MipsELFStreamer.

Definition at line 391 of file MCStreamer.cpp.

Referenced by EmitCFIStartProc().

◆ EmitCFIUndefined()

void MCStreamer::EmitCFIUndefined ( int64_t  Register)
virtual

◆ EmitCFIWindowSave()

void MCStreamer::EmitCFIWindowSave ( )
virtual

◆ emitCGProfileEntry()

void MCStreamer::emitCGProfileEntry ( const MCSymbolRefExpr From,
const MCSymbolRefExpr To,
uint64_t  Count 
)
virtual

Reimplemented in llvm::MCELFStreamer.

Definition at line 709 of file MCStreamer.cpp.

Referenced by llvm::TargetLoweringObjectFileELF::emitModuleMetadata().

◆ EmitCodeAlignment()

void MCStreamer::EmitCodeAlignment ( unsigned  ByteAlignment,
unsigned  MaxBytesToEmit = 0 
)
virtual

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.

Parameters
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 in llvm::MCObjectStreamer.

Definition at line 1031 of file MCStreamer.cpp.

Referenced by llvm::MipsAsmPrinter::EmitEndOfAsmFile(), llvm::ConstantPool::emitEntries(), EmitNops(), llvm::MipsTargetELFStreamer::finish(), and smallData().

◆ EmitCodePaddingBasicBlockEnd()

virtual void llvm::MCStreamer::EmitCodePaddingBasicBlockEnd ( const MCCodePaddingContext Context)
inlinevirtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 769 of file MCStreamer.h.

◆ EmitCodePaddingBasicBlockStart()

virtual void llvm::MCStreamer::EmitCodePaddingBasicBlockStart ( const MCCodePaddingContext Context)
inlinevirtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 766 of file MCStreamer.h.

◆ EmitCOFFImgRel32()

void MCStreamer::EmitCOFFImgRel32 ( MCSymbol const Symbol,
int64_t  Offset 
)
virtual

Emits a COFF image relative relocation.

Parameters
Symbol- Symbol the image relative relocation should point to.

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 876 of file MCStreamer.cpp.

◆ EmitCOFFSafeSEH()

void MCStreamer::EmitCOFFSafeSEH ( MCSymbol const Symbol)
virtual

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 868 of file MCStreamer.cpp.

◆ EmitCOFFSecRel32()

void MCStreamer::EmitCOFFSecRel32 ( MCSymbol const Symbol,
uint64_t  Offset 
)
virtual

Emits a COFF section relative relocation.

Parameters
Symbol- Symbol the section relative relocation should point to.

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 874 of file MCStreamer.cpp.

Referenced by llvm::CodeViewContext::emitLineTableForFunction(), and EmitSymbolValue().

◆ EmitCOFFSectionIndex()

void MCStreamer::EmitCOFFSectionIndex ( MCSymbol const Symbol)
virtual

Emits a COFF section index.

Parameters
Symbol- Symbol the section number relocation should point to.

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 872 of file MCStreamer.cpp.

Referenced by llvm::CodeViewContext::emitLineTableForFunction().

◆ EmitCOFFSymbolIndex()

void MCStreamer::EmitCOFFSymbolIndex ( MCSymbol const Symbol)
virtual

Emits the symbol table index of a Symbol into the current section.

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 870 of file MCStreamer.cpp.

◆ EmitCOFFSymbolStorageClass()

void MCStreamer::EmitCOFFSymbolStorageClass ( int  StorageClass)
virtual

Emit the storage class of the symbol.

Parameters
StorageClass- The storage class the symbol should have.

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 1003 of file MCStreamer.cpp.

References llvm_unreachable.

◆ EmitCOFFSymbolType()

void MCStreamer::EmitCOFFSymbolType ( int  Type)
virtual

Emit the type of the symbol.

Parameters
Type- A COFF type identifier (see COFF::SymbolType in X86COFF.h)

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 1006 of file MCStreamer.cpp.

References llvm_unreachable.

◆ EmitCommonSymbol()

virtual void llvm::MCStreamer::EmitCommonSymbol ( MCSymbol Symbol,
uint64_t  Size,
unsigned  ByteAlignment 
)
pure virtual

Emit a common symbol.

Parameters
Symbol- The common symbol to emit.
Size- The size of the common symbol.
ByteAlignment- The alignment of the symbol if non-zero. This must be a power of 2.

Implemented in llvm::MCWinCOFFStreamer, llvm::RecordStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.

◆ EmitCVDefRangeDirective()

void MCStreamer::EmitCVDefRangeDirective ( ArrayRef< std::pair< const MCSymbol *, const MCSymbol *>>  Ranges,
StringRef  FixedSizePortion 
)
virtual

This implements the CodeView '.cv_def_range' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 326 of file MCStreamer.cpp.

Referenced by llvm::MCObjectStreamer::EmitCVDefRangeDirective(), and printDwarfFileDirective().

◆ EmitCVFileChecksumOffsetDirective()

virtual void llvm::MCStreamer::EmitCVFileChecksumOffsetDirective ( unsigned  FileNo)
inlinevirtual

This implements the CodeView '.cv_filechecksumoffset' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 867 of file MCStreamer.h.

◆ EmitCVFileChecksumsDirective()

virtual void llvm::MCStreamer::EmitCVFileChecksumsDirective ( )
inlinevirtual

This implements the CodeView '.cv_filechecksums' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 863 of file MCStreamer.h.

◆ EmitCVFileDirective()

bool MCStreamer::EmitCVFileDirective ( unsigned  FileNo,
StringRef  Filename,
ArrayRef< uint8_t >  Checksum,
unsigned  ChecksumKind 
)
virtual

Associate a filename with a specified logical file number, and also specify that file's checksum information.

This implements the '.cv_file 4 "foo.c"' assembler directive. Returns true on success.

Definition at line 264 of file MCStreamer.cpp.

References llvm::CodeViewContext::addFile(), getContext(), and llvm::MCContext::getCVContext().

Referenced by llvm::CodeViewDebug::CodeViewDebug().

◆ EmitCVFPOData()

virtual void llvm::MCStreamer::EmitCVFPOData ( const MCSymbol ProcSym,
SMLoc  Loc = {} 
)
inlinevirtual

This implements the CodeView '.cv_fpo_data' assembler directive.

Definition at line 870 of file MCStreamer.h.

References Debug, From, llvm::MipsISD::Hi, llvm::MipsISD::Lo, and Register.

◆ EmitCVFuncIdDirective()

bool MCStreamer::EmitCVFuncIdDirective ( unsigned  FunctionId)
virtual

Introduces a function id for use with .cv_loc.

Definition at line 271 of file MCStreamer.cpp.

References getContext(), llvm::MCContext::getCVContext(), and llvm::CodeViewContext::recordFunctionId().

Referenced by printDwarfFileDirective().

◆ EmitCVInlineLinetableDirective()

void MCStreamer::EmitCVInlineLinetableDirective ( unsigned  PrimaryFunctionId,
unsigned  SourceFileId,
unsigned  SourceLineNum,
const MCSymbol FnStartSym,
const MCSymbol FnEndSym 
)
virtual

This implements the CodeView '.cv_inline_linetable' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 320 of file MCStreamer.cpp.

Referenced by llvm::MCObjectStreamer::EmitCVInlineLinetableDirective(), and printDwarfFileDirective().

◆ EmitCVInlineSiteIdDirective()

bool MCStreamer::EmitCVInlineSiteIdDirective ( unsigned  FunctionId,
unsigned  IAFunc,
unsigned  IAFile,
unsigned  IALine,
unsigned  IACol,
SMLoc  Loc 
)
virtual

Introduces an inline call site id for use with .cv_loc.

Includes extra information for inline line table generation.

Definition at line 275 of file MCStreamer.cpp.

References getContext(), llvm::MCContext::getCVContext(), llvm::CodeViewContext::recordInlinedCallSiteId(), and llvm::MCContext::reportError().

Referenced by llvm::CodeViewDebug::CodeViewDebug(), and printDwarfFileDirective().

◆ EmitCVLinetableDirective()

void MCStreamer::EmitCVLinetableDirective ( unsigned  FunctionId,
const MCSymbol FnStart,
const MCSymbol FnEnd 
)
virtual

This implements the CodeView '.cv_linetable' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 316 of file MCStreamer.cpp.

Referenced by printDwarfFileDirective().

◆ EmitCVLocDirective()

void MCStreamer::EmitCVLocDirective ( unsigned  FunctionId,
unsigned  FileNo,
unsigned  Line,
unsigned  Column,
bool  PrologueEnd,
bool  IsStmt,
StringRef  FileName,
SMLoc  Loc 
)
virtual

This implements the CodeView '.cv_loc' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 289 of file MCStreamer.cpp.

◆ EmitCVStringTableDirective()

virtual void llvm::MCStreamer::EmitCVStringTableDirective ( )
inlinevirtual

This implements the CodeView '.cv_stringtable' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 860 of file MCStreamer.h.

◆ EmitDataRegion()

virtual void llvm::MCStreamer::EmitDataRegion ( MCDataRegionType  Kind)
inlinevirtual

Note in the output the specified region Kind.

Definition at line 452 of file MCStreamer.h.

Referenced by llvm::ConstantPool::emitEntries(), llvm::MipsAsmPrinter::EmitFunctionBodyEnd(), and llvm::MipsAsmPrinter::EmitInstruction().

◆ EmitDTPRel32Value()

void MCStreamer::EmitDTPRel32Value ( const MCExpr Value)
virtual

Emit the expression Value into the output as a dtprel (32-bit DTP relative) value.

This is used to implement assembler directives such as .dtprelword on targets that support them.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 174 of file MCStreamer.cpp.

References llvm::report_fatal_error().

Referenced by llvm::MipsAsmPrinter::EmitDebugValue().

◆ EmitDTPRel64Value()

void MCStreamer::EmitDTPRel64Value ( const MCExpr Value)
virtual

Emit the expression Value into the output as a dtprel (64-bit DTP relative) value.

This is used to implement assembler directives such as .dtpreldword on targets that support them.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 170 of file MCStreamer.cpp.

References llvm::report_fatal_error().

Referenced by llvm::MipsAsmPrinter::EmitDebugValue().

◆ emitDwarfFile0Directive()

void MCStreamer::emitDwarfFile0Directive ( StringRef  Directory,
StringRef  Filename,
MD5::MD5Result Checksum,
Optional< StringRef Source,
unsigned  CUID = 0 
)
virtual

Specify the "root" file of the compilation, using the ".file 0" extension.

Definition at line 215 of file MCStreamer.cpp.

References getContext(), and llvm::MCContext::setMCLineTableRootFile().

◆ EmitDwarfFileDirective()

unsigned llvm::MCStreamer::EmitDwarfFileDirective ( unsigned  FileNo,
StringRef  Directory,
StringRef  Filename,
MD5::MD5Result Checksum = nullptr,
Optional< StringRef Source = None,
unsigned  CUID = 0 
)
inline

Associate a filename with a specified logical file number.

This implements the DWARF2 '.file 4 "foo.c"' assembler directive.

Definition at line 783 of file MCStreamer.h.

References llvm::cantFail(), llvm::lltok::ChecksumKind, llvm::None, and llvm::Sched::Source.

◆ EmitDwarfLocDirective()

void MCStreamer::EmitDwarfLocDirective ( unsigned  FileNo,
unsigned  Line,
unsigned  Column,
unsigned  Flags,
unsigned  Isa,
unsigned  Discriminator,
StringRef  FileName 
)
virtual

This implements the DWARF2 '.loc fileno lineno ...' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 231 of file MCStreamer.cpp.

References getContext(), and llvm::MCContext::setCurrentDwarfLoc().

Referenced by llvm::MCObjectStreamer::EmitDwarfLocDirective(), and printDwarfFileDirective().

◆ EmitEHSymAttributes()

void MCStreamer::EmitEHSymAttributes ( const MCSymbol Symbol,
MCSymbol EHSymbol 
)
virtual

Definition at line 330 of file MCStreamer.cpp.

◆ emitELFSize()

void MCStreamer::emitELFSize ( MCSymbol Symbol,
const MCExpr Value 
)
virtual

Emit an ELF .size directive.

This corresponds to an assembler statement such as: .size symbol, expression

Reimplemented in llvm::MCWasmStreamer, and llvm::MCELFStreamer.

Definition at line 1009 of file MCStreamer.cpp.

Referenced by llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), and llvm::MipsAsmPrinter::EmitStartOfAsmFile().

◆ emitELFSymverDirective()

void MCStreamer::emitELFSymverDirective ( StringRef  AliasName,
const MCSymbol Aliasee 
)
virtual

Emit an ELF .symver directive.

This corresponds to an assembler statement such as: .symver _start, foo@SOME_VERSION

Parameters
AliasName- The versioned alias (i.e. "foo@@SOME_VERSION")
Aliasee- The aliased symbol (i.e. "_start")

Reimplemented in llvm::RecordStreamer, and llvm::MCELFStreamer.

Definition at line 1010 of file MCStreamer.cpp.

◆ emitExplicitComments()

void MCStreamer::emitExplicitComments ( )
virtual

Emit added explicit comments.

Definition at line 114 of file MCStreamer.cpp.

◆ EmitFileDirective()

void MCStreamer::EmitFileDirective ( StringRef  Filename)
virtual

Switch to a new logical file.

This is used to implement the '.file "foo.c"' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 1002 of file MCStreamer.cpp.

◆ emitFill() [1/3]

void MCStreamer::emitFill ( uint64_t  NumBytes,
uint8_t  FillValue 
)

Emit NumBytes bytes worth of the value specified by FillValue.

This implements directives such as '.space'.

Definition at line 196 of file MCStreamer.cpp.

References llvm::MCConstantExpr::create(), and getContext().

Referenced by EmitGenDwarfRanges(), EmitZeros(), and PrintQuotedString().

◆ emitFill() [2/3]

void MCStreamer::emitFill ( const MCExpr NumBytes,
uint64_t  FillValue,
SMLoc  Loc = SMLoc() 
)
virtual

Emit Size bytes worth of the value specified by FillValue.

This is used to implement assembler directives such as .space or .skip.

Parameters
NumBytes- The number of bytes to emit.
FillValue- The value to use when filling bytes.
Loc- The location of the expression for error reporting.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 1025 of file MCStreamer.cpp.

◆ emitFill() [3/3]

void MCStreamer::emitFill ( const MCExpr NumValues,
int64_t  Size,
int64_t  Expr,
SMLoc  Loc = SMLoc() 
)
virtual

Emit NumValues copies of Size bytes.

Each Size bytes is taken from the lowest order 4 bytes of Expr expression.

This is used to implement assembler directives such as .fill.

Parameters
NumValues- The number of copies of Size bytes to emit.
Size- The size (in bytes) of each repeated value.
Expr- The expression from which Size bytes are used.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 1026 of file MCStreamer.cpp.

◆ EmitGPRel32Value()

void MCStreamer::EmitGPRel32Value ( const MCExpr Value)
virtual

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 in llvm::MCObjectStreamer.

Definition at line 190 of file MCStreamer.cpp.

References llvm::report_fatal_error().

◆ EmitGPRel64Value()

void MCStreamer::EmitGPRel64Value ( const MCExpr Value)
virtual

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 in llvm::MCObjectStreamer.

Definition at line 186 of file MCStreamer.cpp.

References llvm::report_fatal_error().

◆ EmitIdent()

virtual void llvm::MCStreamer::EmitIdent ( StringRef  IdentString)
inlinevirtual

Emit the "identifiers" directive.

This implements the '.ident "version foo"' assembler directive.

Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 779 of file MCStreamer.h.

◆ EmitInstruction()

void MCStreamer::EmitInstruction ( const MCInst Inst,
const MCSubtargetInfo STI,
bool  PrintSchedInfo = false 
)
virtual

◆ EmitIntValue()

void MCStreamer::EmitIntValue ( uint64_t  Value,
unsigned  Size 
)
virtual

Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.

EmitIntValue - Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.

Reimplemented in llvm::MipsELFStreamer.

Definition at line 124 of file MCStreamer.cpp.

References assert(), EmitBytes(), llvm::MCContext::getAsmInfo(), llvm::isIntN(), llvm::MCAsmInfo::isLittleEndian(), llvm::isUIntN(), and Size.

Referenced by ARM64EmitUnwindCode(), ARM64EmitUnwindInfo(), llvm::BTFDebug::BTFDebug(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCObjectStreamer::emitAbsoluteSymbolDiff(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), EmitDwarfLineTable(), emitDwarfSetLineAddr(), emitEncodingByte(), llvm::CodeViewContext::emitFileChecksums(), llvm::MCObjectStreamer::emitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCELFStreamer::EmitIdent(), llvm::MipsELFStreamer::EmitIntValue(), llvm::CodeViewContext::emitLineTableForFunction(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), emitNonLazySymbolPointer(), emitOneV5FileEntry(), llvm::AMDGPUTargetELFStreamer::EmitPALMetadata(), llvm::MCDwarfLineStr::emitRef(), llvm::CodeViewContext::emitStringTable(), llvm::BTFTypeBase::emitType(), llvm::BTFTypeInt::emitType(), llvm::BTFTypeEnum::emitType(), llvm::BTFTypeArray::emitType(), llvm::BTFTypeStruct::emitType(), llvm::BTFTypeFuncProto::emitType(), EmitUnwindCode(), EmitUnwindInfo(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::WebAssemblyTargetStreamer::emitValueType(), getTryAncestor(), llvm::MSP430TargetELFStreamer::MSP430TargetELFStreamer(), llvm::operator<<(), printFPOReg(), llvm::StackMaps::recordStatepoint(), llvm::FaultMaps::serializeToFaultMapSection(), and smallData().

◆ EmitLabel()

void MCStreamer::EmitLabel ( MCSymbol Symbol,
SMLoc  Loc = SMLoc() 
)
virtual

Emit a label for Symbol into the current section.

This corresponds to an assembler statement such as: foo:

Parameters
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 in llvm::MCObjectStreamer, llvm::RecordStreamer, llvm::MipsELFStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 347 of file MCStreamer.cpp.

References assert(), llvm::MCTargetStreamer::emitLabel(), getContext(), getCurrentSectionOnly(), llvm::MCSymbol::getFragment(), getTargetStreamer(), llvm::MCSymbol::isUndefined(), llvm::MCSymbol::isVariable(), llvm::MCSymbol::redefineIfPossible(), llvm::MCContext::reportError(), and llvm::MCSymbol::setFragment().

Referenced by ARM64EmitUnwindInfo(), llvm::BTFDebug::beginInstruction(), convertFPR32ToFPR64(), countMCSymbolRefExpr(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfDwoLineTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), emitDirectiveRelocJalr(), llvm::MipsAsmPrinter::EmitEndOfAsmFile(), llvm::ConstantPool::emitEntries(), llvm::MipsAsmPrinter::EmitFunctionEntryLabel(), EmitGenDwarfInfo(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::RecordStreamer::EmitLabel(), llvm::MCObjectStreamer::EmitLabel(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), emitNonLazySymbolPointer(), EmitNop(), EmitNops(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), EmitUnwindInfo(), endSection(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), getGNUBinOpPrecedence(), llvm::AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), getRealVLDOpcode(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), IsSmallMemAccess(), llvm::MCGenDwarfLabelEntry::Make(), nextReg(), printFPOReg(), printMCExpr(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), smallData(), SwitchSection(), and truncateToSize().

◆ EmitLinkerOptions()

virtual void llvm::MCStreamer::EmitLinkerOptions ( ArrayRef< std::string >  Kind)
inlinevirtual

Emit the given list Options of strings as linker options into the output.

Definition at line 449 of file MCStreamer.h.

Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleMetadata().

◆ EmitLocalCommonSymbol()

void MCStreamer::EmitLocalCommonSymbol ( MCSymbol Symbol,
uint64_t  Size,
unsigned  ByteAlignment 
)
virtual

Emit a local common (.lcomm) symbol.

Parameters
Symbol- The common symbol to emit.
Size- The size of the common symbol.
ByteAlignment- The alignment of the common symbol in bytes.

Reimplemented in llvm::MCWinCOFFStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.

Definition at line 1012 of file MCStreamer.cpp.

◆ EmitLOHDirective()

virtual void llvm::MCStreamer::EmitLOHDirective ( MCLOHType  Kind,
const MCLOHArgs Args 
)
inlinevirtual

Emit a Linker Optimization Hint (LOH) directive.

Parameters
Args- Arguments of the LOH.

Definition at line 559 of file MCStreamer.h.

References llvm::LCOMM::ByteAlignment, llvm::Data, and Size.

◆ emitRawComment()

void MCStreamer::emitRawComment ( const Twine T,
bool  TabPrefix = true 
)
virtual

Print T and prefix it with the comment string (normally #) and optionally a tab.

This prints the comment immediately, not at the end of the current line. It is basically a safe version of EmitRawText: since it only prints comments, the object streamer ignores it instead of asserting.

Definition at line 111 of file MCStreamer.cpp.

Referenced by llvm::X86AsmPrinter::EmitInstruction(), and llvm::AVRTargetStreamer::finish().

◆ EmitRawText()

void MCStreamer::EmitRawText ( const Twine String)

If this file is backed by a assembly streamer, this dumps the specified string in the output .s file.

This capability is indicated by the hasRawTextSupport() predicate. By default this aborts.

Definition at line 890 of file MCStreamer.cpp.

References EmitRawTextImpl(), and llvm::Twine::toStringRef().

Referenced by llvm::MCTargetStreamer::emitDwarfFileDirective(), llvm::MCTargetStreamer::emitRawBytes(), llvm::MCTargetStreamer::emitValue(), and llvm::NVPTXTargetStreamer::outputDwarfFileDirectives().

◆ EmitRawTextImpl()

void MCStreamer::EmitRawTextImpl ( StringRef  String)
protectedvirtual

EmitRawText - If this file is backed by an assembly streamer, this dumps the specified string in the output .s file.

This capability is indicated by the hasRawTextSupport() predicate.

Definition at line 881 of file MCStreamer.cpp.

References llvm::report_fatal_error().

Referenced by EmitRawText().

◆ EmitRelocDirective()

virtual bool llvm::MCStreamer::EmitRelocDirective ( const MCExpr Offset,
StringRef  Name,
const MCExpr Expr,
SMLoc  Loc,
const MCSubtargetInfo STI 
)
inlinevirtual

Emit a .reloc directive.

Returns true if the relocation could not be emitted because Name is not known.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 946 of file MCStreamer.h.

Referenced by countMCSymbolRefExpr(), and emitDirectiveRelocJalr().

◆ EmitSLEB128IntValue()

void MCStreamer::EmitSLEB128IntValue ( int64_t  Value)

Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers.

EmitSLEB128IntValue - Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers.

Definition at line 148 of file MCStreamer.cpp.

References EmitBytes(), llvm::encodeSLEB128(), and llvm::raw_svector_ostream::str().

Referenced by llvm::MCObjectStreamer::EmitSLEB128Value().

◆ EmitSLEB128Value()

void MCStreamer::EmitSLEB128Value ( const MCExpr Value)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 1024 of file MCStreamer.cpp.

◆ EmitSymbolAttribute()

virtual bool llvm::MCStreamer::EmitSymbolAttribute ( MCSymbol Symbol,
MCSymbolAttr  Attribute 
)
pure virtual

◆ EmitSymbolDesc()

void MCStreamer::EmitSymbolDesc ( MCSymbol Symbol,
unsigned  DescValue 
)
virtual

Set the DescValue for the Symbol.

Parameters
Symbol- The symbol to have its n_desc field set.
DescValue- The value to set into the n_desc field.

Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 995 of file MCStreamer.cpp.

◆ EmitSymbolValue()

void MCStreamer::EmitSymbolValue ( const MCSymbol Sym,
unsigned  Size,
bool  IsSectionRelative = false 
)

◆ EmitSyntaxDirective()

void MCStreamer::EmitSyntaxDirective ( )
virtual

Definition at line 760 of file MCStreamer.cpp.

◆ EmitTBSSSymbol()

void MCStreamer::EmitTBSSSymbol ( MCSection Section,
MCSymbol Symbol,
uint64_t  Size,
unsigned  ByteAlignment = 0 
)
virtual

Emit a thread local bss (.tbss) symbol.

Parameters
Section- The thread local common section.
Symbol- The thread local common symbol to emit.
Size- The size of the symbol.
ByteAlignment- The alignment of the thread local common symbol if non-zero. This must be a power of 2 on some targets.

Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 1014 of file MCStreamer.cpp.

◆ EmitThumbFunc()

void MCStreamer::EmitThumbFunc ( MCSymbol Func)
virtual

Note in the output that the specified Func is a Thumb mode function (ARM target only).

Reimplemented in llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 994 of file MCStreamer.cpp.

◆ EmitTPRel32Value()

void MCStreamer::EmitTPRel32Value ( const MCExpr Value)
virtual

Emit the expression Value into the output as a tprel (32-bit TP relative) value.

This is used to implement assembler directives such as .tprelword on targets that support them.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 182 of file MCStreamer.cpp.

References llvm::report_fatal_error().

◆ EmitTPRel64Value()

void MCStreamer::EmitTPRel64Value ( const MCExpr Value)
virtual

Emit the expression Value into the output as a tprel (64-bit TP relative) value.

This is used to implement assembler directives such as .tpreldword on targets that support them.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 178 of file MCStreamer.cpp.

References llvm::report_fatal_error().

◆ EmitULEB128IntValue()

void MCStreamer::EmitULEB128IntValue ( uint64_t  Value)

Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers.

EmitULEB128IntValue - Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers.

Definition at line 139 of file MCStreamer.cpp.

References EmitBytes(), llvm::encodeULEB128(), and llvm::raw_svector_ostream::str().

Referenced by EmitAbbrev(), llvm::MCObjectStreamer::emitAbsoluteSymbolDiffAsULEB128(), EmitDwarfLineTable(), emitDwarfSetLineAddr(), EmitGenDwarfAbbrev(), EmitGenDwarfInfo(), llvm::WebAssemblyTargetWasmStreamer::emitLocal(), emitOneV5FileEntry(), llvm::MCDwarfLineStr::emitRef(), and llvm::MCObjectStreamer::EmitULEB128Value().

◆ EmitULEB128Value()

void MCStreamer::EmitULEB128Value ( const MCExpr Value)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 1023 of file MCStreamer.cpp.

Referenced by emitAbsoluteSymbolDiffAsULEB128().

◆ EmitValue()

void MCStreamer::EmitValue ( const MCExpr Value,
unsigned  Size,
SMLoc  Loc = SMLoc() 
)

◆ EmitValueImpl()

void MCStreamer::EmitValueImpl ( const MCExpr Value,
unsigned  Size,
SMLoc  Loc = SMLoc() 
)
virtual

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.

Parameters
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 in llvm::MCObjectStreamer, llvm::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MipsELFStreamer.

Definition at line 1020 of file MCStreamer.cpp.

References visitUsedExpr().

Referenced by llvm::MipsTargetELFStreamer::emitDirectiveEnd(), EmitSymbolValue(), EmitValue(), and llvm::MCObjectStreamer::EmitValueImpl().

◆ EmitValueToAlignment()

void MCStreamer::EmitValueToAlignment ( unsigned  ByteAlignment,
int64_t  Value = 0,
unsigned  ValueSize = 1,
unsigned  MaxBytesToEmit = 0 
)
virtual

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.

Parameters
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 in llvm::MCObjectStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.

Definition at line 1028 of file MCStreamer.cpp.

Referenced by ARM64EmitRuntimeFunction(), ARM64EmitUnwindInfo(), createPPCMCAsmInfo(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), EmitRuntimeFunction(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), EmitUnwindInfo(), llvm::MipsTargetELFStreamer::finish(), printFPOReg(), and llvm::StackMaps::recordStatepoint().

◆ emitValueToOffset()

void MCStreamer::emitValueToOffset ( const MCExpr Offset,
unsigned char  Value,
SMLoc  Loc 
)
virtual

Emit some number of copies of Value until the byte offset Offset is reached.

This is used to implement assembler directives such as .org.

Parameters
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 in llvm::MCObjectStreamer.

Definition at line 1033 of file MCStreamer.cpp.

Referenced by llvm::MCParserUtils::parseAssignmentExpression().

◆ EmitVersionForTarget()

void MCStreamer::EmitVersionForTarget ( const Triple Target,
const VersionTuple SDKVersion 
)

◆ EmitVersionMin()

virtual void llvm::MCStreamer::EmitVersionMin ( MCVersionMinType  Type,
unsigned  Major,
unsigned  Minor,
unsigned  Update,
VersionTuple  SDKVersion 
)
inlinevirtual

Specify the Mach-O minimum deployment target version.

Definition at line 455 of file MCStreamer.h.

Referenced by EmitVersionForTarget().

◆ EmitWeakReference()

void MCStreamer::EmitWeakReference ( MCSymbol Alias,
const MCSymbol Symbol 
)
virtual

Emit an weak reference from Alias to Symbol.

This corresponds to an assembler statement such as: .weakref alias, symbol

Parameters
Alias- The alias that is being created.
Symbol- The symbol being aliased.

Reimplemented in llvm::MCObjectStreamer, llvm::MCWasmStreamer, and llvm::MCELFStreamer.

Definition at line 1017 of file MCStreamer.cpp.

◆ EmitWinCFIAllocStack()

void MCStreamer::EmitWinCFIAllocStack ( unsigned  Size,
SMLoc  Loc = SMLoc() 
)
virtual

◆ EmitWinCFIEndChained()

void MCStreamer::EmitWinCFIEndChained ( SMLoc  Loc = SMLoc())
virtual

◆ EmitWinCFIEndProc()

void MCStreamer::EmitWinCFIEndProc ( SMLoc  Loc = SMLoc())
virtual

◆ EmitWinCFIEndProlog()

void MCStreamer::EmitWinCFIEndProlog ( SMLoc  Loc = SMLoc())
virtual

◆ EmitWinCFIFuncletOrFuncEnd()

void MCStreamer::EmitWinCFIFuncletOrFuncEnd ( SMLoc  Loc = SMLoc())
virtual

This is used on platforms, such as Windows on ARM64, that require function or funclet sizes to be emitted in .xdata before the End marker is emitted for the frame.

We cannot use the End marker, as it is not set at the point of emitting .xdata, in order to indicate that the frame is active.

Definition at line 646 of file MCStreamer.cpp.

References llvm::WinEH::FrameInfo::ChainedParent, EmitCFILabel(), EnsureValidWinFrameInfo(), llvm::WinEH::FrameInfo::FuncletOrFuncEnd, getContext(), and llvm::MCContext::reportError().

◆ EmitWinCFIPushFrame()

void MCStreamer::EmitWinCFIPushFrame ( bool  Code,
SMLoc  Loc = SMLoc() 
)
virtual

◆ EmitWinCFIPushReg()

void MCStreamer::EmitWinCFIPushReg ( unsigned  Register,
SMLoc  Loc = SMLoc() 
)
virtual

◆ EmitWinCFISaveReg()

void MCStreamer::EmitWinCFISaveReg ( unsigned  Register,
unsigned  Offset,
SMLoc  Loc = SMLoc() 
)
virtual

◆ EmitWinCFISaveXMM()

void MCStreamer::EmitWinCFISaveXMM ( unsigned  Register,
unsigned  Offset,
SMLoc  Loc = SMLoc() 
)
virtual

◆ EmitWinCFISetFrame()

void MCStreamer::EmitWinCFISetFrame ( unsigned  Register,
unsigned  Offset,
SMLoc  Loc = SMLoc() 
)
virtual

◆ EmitWinCFIStartChained()

void MCStreamer::EmitWinCFIStartChained ( SMLoc  Loc = SMLoc())
virtual

◆ EmitWinCFIStartProc()

void MCStreamer::EmitWinCFIStartProc ( const MCSymbol Symbol,
SMLoc  Loc = SMLoc() 
)
virtual

◆ EmitWindowsUnwindTables()

void MCStreamer::EmitWindowsUnwindTables ( )
protectedvirtual

Definition at line 895 of file MCStreamer.cpp.

◆ EmitWinEHHandler()

void MCStreamer::EmitWinEHHandler ( const MCSymbol Sym,
bool  Unwind,
bool  Except,
SMLoc  Loc = SMLoc() 
)
virtual

◆ EmitWinEHHandlerData()

void MCStreamer::EmitWinEHHandlerData ( SMLoc  Loc = SMLoc())
virtual

◆ EmitZerofill()

virtual void llvm::MCStreamer::EmitZerofill ( MCSection Section,
MCSymbol Symbol = nullptr,
uint64_t  Size = 0,
unsigned  ByteAlignment = 0,
SMLoc  Loc = SMLoc() 
)
pure virtual

Emit the zerofill section and an optional symbol.

Parameters
Section- The zerofill section to create and or to put the symbol
Symbol- The zerofill symbol to emit, if non-NULL.
Size- The size of the zerofill symbol.
ByteAlignment- The alignment of the zerofill symbol if non-zero. This must be a power of 2 on some targets.

Implemented in llvm::MCWasmStreamer, llvm::MCWinCOFFStreamer, llvm::MCELFStreamer, and llvm::RecordStreamer.

◆ EmitZeros()

void MCStreamer::EmitZeros ( uint64_t  NumBytes)

Emit NumBytes worth of zeros.

The implementation in this class just redirects to emitFill.

This function properly handles data in virtual sections.

Definition at line 201 of file MCStreamer.cpp.

References emitFill().

Referenced by llvm::AsmPrinter::XRayFunctionEntry::emit(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), and llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol().

◆ EndCOFFSymbolDef()

void MCStreamer::EndCOFFSymbolDef ( )
virtual

Marks the end of the symbol definition.

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 999 of file MCStreamer.cpp.

References llvm_unreachable.

◆ endSection()

MCSymbol * MCStreamer::endSection ( MCSection Section)

◆ EnsureValidWinFrameInfo()

WinEH::FrameInfo * MCStreamer::EnsureValidWinFrameInfo ( SMLoc  Loc)

◆ Finish()

void MCStreamer::Finish ( )

Finish emission of machine code.

Definition at line 898 of file MCStreamer.cpp.

References llvm::MCTargetStreamer::finish(), FinishImpl(), getContext(), getTargetStreamer(), and llvm::MCContext::reportError().

◆ FinishImpl()

void MCStreamer::FinishImpl ( )
virtual

Streamer specific finalization.

Reimplemented in llvm::MCObjectStreamer, llvm::MCELFStreamer, llvm::MCWasmStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 1037 of file MCStreamer.cpp.

Referenced by Finish().

◆ generateCompactUnwindEncodings()

void MCStreamer::generateCompactUnwindEncodings ( MCAsmBackend MAB)

◆ getAssemblerPtr()

virtual MCAssembler* llvm::MCStreamer::getAssemblerPtr ( )
inlinevirtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 253 of file MCStreamer.h.

◆ getAssociatedPDataSection()

MCSection * MCStreamer::getAssociatedPDataSection ( const MCSection TextSec)

Get the .pdata section used for the given section.

Typically the given section is either the main .text section or some other COMDAT .text section, but it may be any section containing code.

Definition at line 748 of file MCStreamer.cpp.

References getContext(), and getWinCFISection().

Referenced by llvm::Win64EH::UnwindEmitter::Emit(), and llvm::Win64EH::ARM64UnwindEmitter::Emit().

◆ getAssociatedXDataSection()

MCSection * MCStreamer::getAssociatedXDataSection ( const MCSection TextSec)

◆ GetCommentOS()

raw_ostream & MCStreamer::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.

Definition at line 106 of file MCStreamer.cpp.

References llvm::nulls().

◆ getContext()

MCContext& llvm::MCStreamer::getContext ( ) const
inline

Definition at line 251 of file MCStreamer.h.

References Context.

Referenced by llvm::AssemblerConstantPools::addEntry(), llvm::CodeViewContext::addFile(), ARM64EmitRuntimeFunction(), ARM64EmitUnwindInfo(), llvm::BTFDebug::beginInstruction(), llvm::BTFDebug::BTFDebug(), buildSymbolDiff(), llvm::NVPTXTargetStreamer::changeSection(), llvm::MCTargetStreamer::changeSection(), llvm::MCObjectStreamer::changeSectionImpl(), checkCVLocSection(), llvm::CodeViewDebug::CodeViewDebug(), convertFPR32ToFPR64(), createPPCMCAsmInfo(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfLineTable::Emit(), llvm::MCDwarfLineAddr::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), EmitAbsDifference(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), llvm::AMDGPUTargetELFStreamer::EmitAMDGPUSymbolType(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::MipsELFStreamer::EmitCFIEndProcImpl(), llvm::MipsELFStreamer::EmitCFILabel(), EmitCFIStartProc(), llvm::MipsELFStreamer::EmitCFIStartProcImpl(), llvm::MCWinCOFFStreamer::EmitCOFFImgRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::EmitCOFFSecRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSectionIndex(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MCObjectStreamer::EmitCVDefRangeDirective(), llvm::MCObjectStreamer::EmitCVFileChecksumOffsetDirective(), llvm::MCObjectStreamer::EmitCVFileChecksumsDirective(), EmitCVFileDirective(), EmitCVFuncIdDirective(), llvm::MCObjectStreamer::EmitCVInlineLinetableDirective(), EmitCVInlineSiteIdDirective(), llvm::MCObjectStreamer::EmitCVLocDirective(), llvm::MCObjectStreamer::EmitCVStringTableDirective(), emitDwarfFile0Directive(), EmitDwarfLineTable(), EmitDwarfLocDirective(), emitFDESymbol(), llvm::CodeViewContext::emitFileChecksumOffset(), llvm::CodeViewContext::emitFileChecksums(), llvm::MCObjectStreamer::emitFill(), emitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCELFStreamer::EmitIdent(), llvm::ARMTargetStreamer::emitInst(), llvm::MipsELFStreamer::EmitInstruction(), EmitLabel(), llvm::CodeViewContext::emitLineTableForFunction(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), emitNonLazySymbolPointer(), EmitNops(), EmitPersonality(), llvm::NVPTXTargetStreamer::emitRawBytes(), llvm::MCTargetStreamer::emitRawBytes(), llvm::MCDwarfLineStr::emitRef(), llvm::MCObjectStreamer::EmitRelocDirective(), EmitRuntimeFunction(), llvm::MCDwarfLineStr::emitSection(), llvm::CodeViewContext::emitStringTable(), EmitSymbolRefWithOfs(), EmitSymbolValue(), EmitUnwindInfo(), llvm::MCTargetStreamer::emitValue(), llvm::AVRMCELFStreamer::EmitValueForModiferKind(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::MCELFStreamer::EmitWeakReference(), llvm::MCWasmStreamer::EmitWeakReference(), EmitWinCFIAllocStack(), EmitWinCFIEndChained(), EmitWinCFIEndProc(), EmitWinCFIFuncletOrFuncEnd(), EmitWinCFIPushFrame(), EmitWinCFISaveReg(), EmitWinCFISaveXMM(), EmitWinCFISetFrame(), EmitWinCFIStartProc(), EmitWinEHHandler(), EmitWinEHHandlerData(), EnsureValidWinFrameInfo(), llvm::AVRTargetStreamer::finish(), Finish(), llvm::MCWinCOFFStreamer::FinishImpl(), llvm::MCObjectStreamer::FinishImpl(), llvm::MCObjectStreamer::flushPendingLabels(), llvm::RecordStreamer::flushSymverDirectives(), forceExpAbs(), GetAbsDifference(), getAssociatedPDataSection(), getAssociatedXDataSection(), llvm::AMDGPUTargetStreamer::getContext(), getDataAlignmentFactor(), getDwarfLineTableSymbol(), llvm::SparcELFMCAsmInfo::getExprForFDESymbol(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::SparcELFMCAsmInfo::getExprForPersonalitySymbol(), llvm::X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(), getRetOpcode(), getSizeForEncoding(), hasUnfinishedDwarfFrameInfo(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCELFStreamer::InitSections(), llvm::MCWinCOFFStreamer::InitSections(), InitSections(), llvm::MCDwarfLineEntry::Make(), llvm::MCGenDwarfLabelEntry::Make(), llvm::MSP430TargetELFStreamer::MSP430TargetELFStreamer(), nextReg(), printFPOReg(), smallData(), and tryEmitDwarfFileDirective().

◆ getCurrentSection()

MCSectionSubPair llvm::MCStreamer::getCurrentSection ( ) const
inline

Return the current section that the streamer is emitting code to.

Definition at line 341 of file MCStreamer.h.

References llvm::SmallVectorTemplateCommon< T >::back(), and llvm::SmallVectorBase::empty().

Referenced by llvm::MCELFStreamer::EmitCommonSymbol(), and llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol().

◆ getCurrentSectionOnly()

MCSection* llvm::MCStreamer::getCurrentSectionOnly ( ) const
inline

◆ getCurrentWinFrameInfo()

WinEH::FrameInfo* llvm::MCStreamer::getCurrentWinFrameInfo ( )
inlineprotected

Definition at line 224 of file MCStreamer.h.

References FuncId, and llvm::String.

◆ getDwarfFrameInfos()

ArrayRef<MCDwarfFrameInfo> llvm::MCStreamer::getDwarfFrameInfos ( ) const
inline

◆ getDwarfLineTableSymbol()

MCSymbol * MCStreamer::getDwarfLineTableSymbol ( unsigned  CUID)
virtual

◆ getNumFrameInfos()

unsigned llvm::MCStreamer::getNumFrameInfos ( )
inline

◆ getNumWinFrameInfos()

unsigned llvm::MCStreamer::getNumWinFrameInfos ( )
inline

Definition at line 277 of file MCStreamer.h.

◆ getPreviousSection()

MCSectionSubPair llvm::MCStreamer::getPreviousSection ( ) const
inline

Return the previous section that the streamer is emitting code to.

Definition at line 349 of file MCStreamer.h.

References llvm::SmallVectorTemplateCommon< T >::back(), and llvm::SmallVectorBase::empty().

◆ GetSymbolOrder()

unsigned llvm::MCStreamer::GetSymbolOrder ( const MCSymbol Sym) const
inline

Returns an index to represent the order a symbol was emitted in.

(zero if we did not emit that symbol)

Definition at line 357 of file MCStreamer.h.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().

◆ getTargetStreamer()

MCTargetStreamer* llvm::MCStreamer::getTargetStreamer ( )
inline

◆ getUseAssemblerInfoForParsing()

bool llvm::MCStreamer::getUseAssemblerInfoForParsing ( )
inline

Definition at line 256 of file MCStreamer.h.

Referenced by llvm::MCObjectStreamer::getAssemblerPtr().

◆ getWinFrameInfos()

ArrayRef<std::unique_ptr<WinEH::FrameInfo> > llvm::MCStreamer::getWinFrameInfos ( ) const
inline

◆ hasRawTextSupport()

virtual bool llvm::MCStreamer::hasRawTextSupport ( ) const
inlinevirtual

Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText.

Definition at line 293 of file MCStreamer.h.

Referenced by makeCombineInst().

◆ hasUnfinishedDwarfFrameInfo()

bool MCStreamer::hasUnfinishedDwarfFrameInfo ( )

Definition at line 250 of file MCStreamer.cpp.

References getContext(), and llvm::MCContext::reportError().

Referenced by EmitCFIStartProc().

◆ InitSections()

void MCStreamer::InitSections ( bool  NoExecStack)
virtual

Create the default sections and set the initial one.

Reimplemented in llvm::MCWinCOFFStreamer, and llvm::MCELFStreamer.

Definition at line 334 of file MCStreamer.cpp.

References getContext(), and SwitchSection().

◆ isIntegratedAssemblerRequired()

virtual bool llvm::MCStreamer::isIntegratedAssemblerRequired ( ) const
inlinevirtual

Is the integrated assembler required for this streamer to function correctly?

Reimplemented in llvm::MCObjectStreamer.

Definition at line 297 of file MCStreamer.h.

◆ isVerboseAsm()

virtual bool llvm::MCStreamer::isVerboseAsm ( ) const
inlinevirtual

Return true if this streamer supports verbose assembly and if it is enabled.

Definition at line 289 of file MCStreamer.h.

Referenced by llvm::X86AsmPrinter::EmitInstruction().

◆ mayHaveInstructions()

virtual bool llvm::MCStreamer::mayHaveInstructions ( MCSection Sec) const
inlinevirtual

◆ operator=()

MCStreamer& llvm::MCStreamer::operator= ( const MCStreamer )
delete

◆ PopSection()

bool llvm::MCStreamer::PopSection ( )
inline

◆ PushSection()

void llvm::MCStreamer::PushSection ( )
inline

◆ reset()

void MCStreamer::reset ( )
virtual

◆ setTargetStreamer()

void llvm::MCStreamer::setTargetStreamer ( MCTargetStreamer TS)
inline

Definition at line 243 of file MCStreamer.h.

Referenced by llvm::MCTargetStreamer::MCTargetStreamer().

◆ setUseAssemblerInfoForParsing()

void llvm::MCStreamer::setUseAssemblerInfoForParsing ( bool  v)
inline

Definition at line 255 of file MCStreamer.h.

◆ SubSection()

bool llvm::MCStreamer::SubSection ( const MCExpr Subsection)
inline

◆ SwitchSection()

void MCStreamer::SwitchSection ( MCSection Section,
const MCExpr Subsection = nullptr 
)
virtual

Set the current section where code is being emitted to Section.

This is required to update CurSection.

This corresponds to assembler directives like .section, .text, etc.

Reimplemented in llvm::MipsELFStreamer.

Definition at line 1040 of file MCStreamer.cpp.

References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), ChangeSection(), EmitLabel(), llvm::MCSection::getBeginSymbol(), and llvm::MCSection::hasEnded().

Referenced by llvm::BTFDebug::BTFDebug(), llvm::Win64EH::UnwindEmitter::Emit(), llvm::Win64EH::ARM64UnwindEmitter::Emit(), llvm::MCDwarfDwoLineTable::Emit(), llvm::MCDwarfLineTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), emitConstantPool(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), EmitDwarfLineTable(), llvm::MipsAsmPrinter::EmitEndOfAsmFile(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCELFStreamer::EmitIdent(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), llvm::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), emitNonLazyStubs(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::MCDwarfLineStr::emitSection(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::Win64EH::UnwindEmitter::EmitUnwindInfo(), llvm::Win64EH::ARM64UnwindEmitter::EmitUnwindInfo(), endSection(), llvm::MipsTargetELFStreamer::finish(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCELFStreamer::InitSections(), llvm::MCWinCOFFStreamer::InitSections(), InitSections(), makeCombineInst(), llvm::MSP430TargetELFStreamer::MSP430TargetELFStreamer(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), smallData(), and llvm::MipsELFStreamer::SwitchSection().

◆ SwitchSectionNoChange()

void llvm::MCStreamer::SwitchSectionNoChange ( MCSection Section,
const MCExpr Subsection = nullptr 
)
inline

Set the current section where code is being emitted to Section.

This is required to update CurSection. This version does not call ChangeSection.

Definition at line 410 of file MCStreamer.h.

References assert(), llvm::SmallVectorTemplateCommon< T >::back(), and llvm::ARMBuildAttrs::Symbol.

◆ tryEmitDwarfFileDirective()

Expected< unsigned > MCStreamer::tryEmitDwarfFileDirective ( unsigned  FileNo,
StringRef  Directory,
StringRef  Filename,
MD5::MD5Result Checksum = nullptr,
Optional< StringRef Source = None,
unsigned  CUID = 0 
)
virtual

Associate a filename with a specified logical file number.

Also associate a directory, optional checksum, and optional source text with the logical file. This implements the DWARF2 '.file 4 "dir/foo.c"' assembler directive, and the DWARF5 '.file 4 "dir/foo.c" md5 "..." source "..."' assembler directive.

Definition at line 206 of file MCStreamer.cpp.

References getContext(), and llvm::MCContext::getDwarfFile().

◆ visitUsedExpr()

void MCStreamer::visitUsedExpr ( const MCExpr Expr)

◆ visitUsedSymbol()

void MCStreamer::visitUsedSymbol ( const MCSymbol Sym)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 927 of file MCStreamer.cpp.

Referenced by visitUsedExpr().


The documentation for this class was generated from the following files: