LLVM  6.0.0svn
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
 
MCTargetStreamergetTargetStreamer ()
 
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...
 
virtual unsigned EmitDwarfFileDirective (unsigned FileNo, StringRef Directory, StringRef Filename, unsigned CUID=0)
 Associate a filename with a specified logical file number. More...
 
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 MCSymbolgetDwarfLineTableSymbol (unsigned CUID)
 
virtual void EmitCFISections (bool EH, bool Debug)
 
void EmitCFIStartProc (bool IsSimple)
 
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 EmitWinCFIStartProc (const MCSymbol *Symbol, SMLoc Loc=SMLoc())
 
virtual void EmitWinCFIEndProc (SMLoc Loc=SMLoc())
 
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())
 
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)
 Emit a .reloc directive. More...
 
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)
 Specify the Mach-O minimum deployment target version. More...
 
virtual void EmitBuildVersion (unsigned Platform, unsigned Major, unsigned Minor, unsigned Update)
 Emit/Specify Mach-O build version command. More...
 
void EmitVersionForTarget (const Triple &Target)
 
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 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 emitELFSize (MCSymbol *Symbol, const MCExpr *Value)
 Emit an ELF .size directive. More...
 
virtual void emitELFSymverDirective (MCSymbol *Alias, 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)=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 EmitPaddedULEB128IntValue (uint64_t Value, unsigned PadTo)
 Like EmitULEB128Value but pads the output to specific number of bytes. 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...
 
virtual 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 (uint64_t NumValues, int64_t Size, int64_t Expr)
 Emit NumValues copies of Size bytes. More...
 
virtual void emitFill (const MCExpr &NumValues, int64_t Size, int64_t Expr, SMLoc Loc=SMLoc())
 
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)
 
virtual MCSymbolEmitCFILabel ()
 When emitting an object file, create and emit a real label. More...
 
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...
 

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 169 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 59 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 282 of file MCStreamer.h.

Referenced by llvm::X86AsmPrinter::EmitInstruction(), llvm::CodeViewContext::emitLineTableForFunction(), EmitNops(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), and llvm::WinException::endFunclet().

◆ 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 77 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 291 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 893 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 913 of file MCStreamer.cpp.

Referenced by SwitchSection().

◆ emitAbsoluteSymbolDiff()

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

◆ 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 890 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 820 of file MCStreamer.cpp.

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

Referenced by emitAbsoluteSymbolDiff(), llvm::RecordStreamer::EmitAssignment(), llvm::MCObjectStreamer::EmitAssignment(), 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 916 of file MCStreamer.cpp.

References EmitBytes().

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

◆ EmitBuildVersion()

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

Emit/Specify Mach-O build version command.

Platform should be one of MachO::PlatformType.

Definition at line 430 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 932 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 933 of file MCStreamer.cpp.

◆ EmitBundleUnlock()

void MCStreamer::EmitBundleUnlock ( )
virtual

Ends a bundle-locked group.

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

Definition at line 935 of file MCStreamer.cpp.

◆ EmitBytes()

void MCStreamer::EmitBytes ( StringRef  Data)
virtual

◆ EmitCFIAdjustCfaOffset()

void MCStreamer::EmitCFIAdjustCfaOffset ( int64_t  Adjustment)
virtual

◆ 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 347 of file MCStreamer.cpp.

References EmitCFIEndProcImpl().

◆ EmitCFIEndProcImpl()

void MCStreamer::EmitCFIEndProcImpl ( MCDwarfFrameInfo CurFrame)
protectedvirtual

Definition at line 354 of file MCStreamer.cpp.

References llvm::MCDwarfFrameInfo::End.

Referenced by EmitCFIEndProc(), and PrintQuotedString().

◆ EmitCFIEscape()

void MCStreamer::EmitCFIEscape ( StringRef  Values)
virtual

◆ EmitCFIGnuArgsSize()

void MCStreamer::EmitCFIGnuArgsSize ( int64_t  Size)
virtual

◆ EmitCFILabel()

MCSymbol * MCStreamer::EmitCFILabel ( )
protectedvirtual

◆ EmitCFILsda()

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

Definition at line 437 of file MCStreamer.cpp.

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

Referenced by PrintCFIEscape().

◆ 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

◆ EmitCFISameValue()

void MCStreamer::EmitCFISameValue ( int64_t  Register)
virtual

◆ EmitCFISections()

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

Reimplemented in llvm::MCObjectStreamer.

Definition at line 318 of file MCStreamer.cpp.

References assert().

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

◆ EmitCFISignalFrame()

void MCStreamer::EmitCFISignalFrame ( )
virtual

Definition at line 503 of file MCStreamer.cpp.

References llvm::MCDwarfFrameInfo::IsSignalFrame.

Referenced by PrintCFIEscape().

◆ EmitCFIStartProc()

void MCStreamer::EmitCFIStartProc ( bool  IsSimple)

◆ EmitCFIStartProcImpl()

void MCStreamer::EmitCFIStartProcImpl ( MCDwarfFrameInfo Frame)
protectedvirtual

Definition at line 344 of file MCStreamer.cpp.

Referenced by EmitCFIStartProc().

◆ EmitCFIUndefined()

void MCStreamer::EmitCFIUndefined ( int64_t  Register)
virtual

◆ EmitCFIWindowSave()

void MCStreamer::EmitCFIWindowSave ( )
virtual

◆ 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 928 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 731 of file MCStreamer.h.

◆ EmitCodePaddingBasicBlockStart()

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

Reimplemented in llvm::MCObjectStreamer.

Definition at line 728 of file MCStreamer.h.

◆ EmitCOFFSafeSEH()

void MCStreamer::EmitCOFFSafeSEH ( MCSymbol const Symbol)
virtual

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 782 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 788 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 785 of file MCStreamer.cpp.

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

◆ 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 900 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 903 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 279 of file MCStreamer.cpp.

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

◆ EmitCVFileChecksumOffsetDirective()

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

This implements the CodeView '.cv_filechecksumoffset' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 805 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 801 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 223 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 808 of file MCStreamer.h.

References Debug, 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 230 of file MCStreamer.cpp.

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

Referenced by PrintQuotedString().

◆ 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 273 of file MCStreamer.cpp.

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

◆ 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 234 of file MCStreamer.cpp.

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

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

◆ 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 269 of file MCStreamer.cpp.

Referenced by llvm::MCObjectStreamer::EmitCVLinetableDirective(), and PrintQuotedString().

◆ EmitCVLocDirective()

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

◆ EmitCVStringTableDirective()

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

This implements the CodeView '.cv_stringtable' assembler directive.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 798 of file MCStreamer.h.

◆ EmitDataRegion()

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

Note in the output the specified region Kind.

Definition at line 422 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 142 of file MCStreamer.cpp.

References llvm::report_fatal_error().

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

◆ 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 138 of file MCStreamer.cpp.

References llvm::report_fatal_error().

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

◆ EmitDwarfFileDirective()

unsigned MCStreamer::EmitDwarfFileDirective ( unsigned  FileNo,
StringRef  Directory,
StringRef  Filename,
unsigned  CUID = 0 
)
virtual

Associate a filename with a specified logical file number.

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

Definition at line 184 of file MCStreamer.cpp.

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

◆ 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 190 of file MCStreamer.cpp.

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

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

◆ EmitEHSymAttributes()

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

Definition at line 283 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 906 of file MCStreamer.cpp.

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

◆ emitELFSymverDirective()

void MCStreamer::emitELFSymverDirective ( MCSymbol Alias,
const MCSymbol Aliasee 
)
virtual

Emit an ELF .symver directive.

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

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

Reimplemented in llvm::RecordStreamer.

Definition at line 907 of file MCStreamer.cpp.

◆ emitExplicitComments()

void MCStreamer::emitExplicitComments ( )
virtual

Emit added explicit comments.

Definition at line 78 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 899 of file MCStreamer.cpp.

◆ emitFill() [1/4]

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

Emit NumBytes bytes worth of the value specified by FillValue.

This implements directives such as '.space'.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 164 of file MCStreamer.cpp.

References EmitIntValue().

Referenced by llvm::MCObjectStreamer::emitFill(), EmitGenDwarfRanges(), EmitZeros(), llvm::MCObjectStreamer::getAssembler(), and PrintQuotedString().

◆ emitFill() [2/4]

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 922 of file MCStreamer.cpp.

◆ emitFill() [3/4]

void MCStreamer::emitFill ( uint64_t  NumValues,
int64_t  Size,
int64_t  Expr 
)
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.

Definition at line 169 of file MCStreamer.cpp.

References EmitIntValue(), and llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size.

◆ emitFill() [4/4]

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

Reimplemented in llvm::MCObjectStreamer.

Definition at line 923 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 158 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 154 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 741 of file MCStreamer.h.

References llvm::lltok::ChecksumKind.

◆ 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.

Definition at line 88 of file MCStreamer.cpp.

References assert(), EmitBytes(), llvm::MCContext::getAsmInfo(), llvm::isIntN(), llvm::MCAsmInfo::isLittleEndian(), llvm::isUIntN(), and llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size.

Referenced by llvm::MCDwarfLineTableHeader::Emit(), llvm::MCObjectStreamer::emitAbsoluteSymbolDiff(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), EmitDwarfLineTable(), emitDwarfSetLineAddr(), emitEncodingByte(), llvm::WebAssemblyTargetELFStreamer::emitEndFunc(), llvm::CodeViewContext::emitFileChecksums(), emitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::WebAssemblyTargetWasmStreamer::emitGlobal(), llvm::MCELFStreamer::EmitIdent(), llvm::MCWasmStreamer::EmitIdent(), llvm::CodeViewContext::emitLineTableForFunction(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), emitNonLazySymbolPointer(), llvm::AMDGPUTargetELFStreamer::EmitPALMetadata(), llvm::CodeViewContext::emitStringTable(), EmitUnwindCode(), EmitUnwindInfo(), emitV2FileDirTables(), emitV5FileDirTables(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::WinException::endFunclet(), getTryAncestor(), 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::MipsELFStreamer, llvm::RecordStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 300 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 llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfDwoLineTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), 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(), EmitNops(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), EmitUnwindInfo(), llvm::WinException::endFunclet(), 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(), 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 419 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 909 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 517 of file MCStreamer.h.

References llvm::LCOMM::ByteAlignment, llvm::Data, and llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size.

◆ EmitPaddedULEB128IntValue()

void MCStreamer::EmitPaddedULEB128IntValue ( uint64_t  Value,
unsigned  PadTo 
)

Like EmitULEB128Value but pads the output to specific number of bytes.

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

Definition at line 103 of file MCStreamer.cpp.

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

Referenced by EmitULEB128IntValue().

◆ 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 75 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 799 of file MCStreamer.cpp.

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

◆ 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 793 of file MCStreamer.cpp.

References llvm::errs().

Referenced by EmitRawText().

◆ EmitRelocDirective()

virtual bool llvm::MCStreamer::EmitRelocDirective ( const MCExpr Offset,
StringRef  Name,
const MCExpr Expr,
SMLoc  Loc 
)
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 871 of file MCStreamer.h.

◆ EmitSLEB128IntValue()

void MCStreamer::EmitSLEB128IntValue ( int64_t  Value)

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

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

Definition at line 116 of file MCStreamer.cpp.

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

Referenced by llvm::WebAssemblyTargetWasmStreamer::emitGlobal(), llvm::MCObjectStreamer::EmitSLEB128Value(), and llvm::WebAssemblyTargetStreamer::emitValueType().

◆ EmitSLEB128Value()

void MCStreamer::EmitSLEB128Value ( const MCExpr Value)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 921 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 892 of file MCStreamer.cpp.

◆ EmitSymbolValue()

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

◆ EmitSyntaxDirective()

void MCStreamer::EmitSyntaxDirective ( )
virtual

Definition at line 674 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::MCWinCOFFStreamer, and llvm::MCELFStreamer.

Definition at line 911 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 891 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 150 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 146 of file MCStreamer.cpp.

References llvm::report_fatal_error().

◆ EmitULEB128IntValue()

void MCStreamer::EmitULEB128IntValue ( uint64_t  Value)

◆ EmitULEB128Value()

void MCStreamer::EmitULEB128Value ( const MCExpr Value)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 920 of file MCStreamer.cpp.

◆ 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 917 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 925 of file MCStreamer.cpp.

Referenced by createPPCMCAsmInfo(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), EmitRuntimeFunction(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), EmitUnwindInfo(), llvm::WinException::endFunclet(), 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 930 of file MCStreamer.cpp.

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

◆ EmitVersionForTarget()

void MCStreamer::EmitVersionForTarget ( const Triple Target)

◆ EmitVersionMin()

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

Specify the Mach-O minimum deployment target version.

Definition at line 425 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 914 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

Definition at line 772 of file MCStreamer.cpp.

References EmitCFILabel(), and llvm::WinEH::FrameInfo::PrologEnd.

Referenced by PrintCFIEscape(), and printConstant().

◆ 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 804 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 
)
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 180 of file MCStreamer.cpp.

References emitFill().

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

◆ EndCOFFSymbolDef()

void MCStreamer::EndCOFFSymbolDef ( )
virtual

Marks the end of the symbol definition.

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 896 of file MCStreamer.cpp.

References llvm_unreachable.

◆ endSection()

MCSymbol * MCStreamer::endSection ( MCSection Section)

◆ Finish()

void MCStreamer::Finish ( )

Finish emission of machine code.

Definition at line 807 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::MCWasmStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 934 of file MCStreamer.cpp.

Referenced by Finish().

◆ generateCompactUnwindEncodings()

void MCStreamer::generateCompactUnwindEncodings ( MCAsmBackend MAB)

◆ 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 662 of file MCStreamer.cpp.

References getContext(), and getWinCFISection().

Referenced by llvm::Win64EH::UnwindEmitter::Emit().

◆ getAssociatedXDataSection()

MCSection * MCStreamer::getAssociatedXDataSection ( const MCSection TextSec)

Get the .xdata section used for the given section.

Definition at line 668 of file MCStreamer.cpp.

References getContext(), and getWinCFISection().

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

◆ 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 70 of file MCStreamer.cpp.

References llvm::nulls().

◆ getContext()

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

Definition at line 234 of file MCStreamer.h.

References Context.

Referenced by llvm::AssemblerConstantPools::addEntry(), llvm::CodeViewContext::addFile(), buildSymbolDiff(), llvm::MCObjectStreamer::changeSectionImpl(), llvm::CodeViewDebug::CodeViewDebug(), createPPCMCAsmInfo(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfLineTable::Emit(), llvm::MCDwarfLineAddr::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), EmitAbsDifference(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), llvm::AMDGPUTargetELFStreamer::EmitAMDGPUSymbolType(), EmitCFIReturnColumn(), EmitCFIStartProc(), 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::EmitCVLinetableDirective(), EmitCVLocDirective(), llvm::MCObjectStreamer::EmitCVStringTableDirective(), EmitDwarfFileDirective(), EmitDwarfLineTable(), EmitDwarfLocDirective(), emitFDESymbol(), llvm::CodeViewContext::emitFileChecksumOffset(), llvm::CodeViewContext::emitFileChecksums(), llvm::MCObjectStreamer::emitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::WebAssemblyTargetWasmStreamer::emitGlobal(), llvm::HexagonMCELFStreamer::EmitInstruction(), llvm::MipsELFStreamer::EmitInstruction(), EmitLabel(), llvm::CodeViewContext::emitLineTableForFunction(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), emitNonLazySymbolPointer(), EmitNops(), EmitPersonality(), llvm::MCObjectStreamer::EmitRelocDirective(), EmitRuntimeFunction(), llvm::CodeViewContext::emitStringTable(), EmitSymbolRefWithOfs(), EmitSymbolValue(), EmitUnwindInfo(), llvm::AVRMCELFStreamer::EmitValueForModiferKind(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::MCELFStreamer::EmitWeakReference(), llvm::MCWasmStreamer::EmitWeakReference(), EmitWinCFIAllocStack(), EmitWinCFIEndChained(), EmitWinCFIEndProc(), EmitWinCFIPushFrame(), EmitWinCFISaveReg(), EmitWinCFISaveXMM(), EmitWinCFISetFrame(), EmitWinCFIStartProc(), EmitWinEHHandler(), EmitWinEHHandlerData(), llvm::AVRTargetStreamer::finish(), Finish(), llvm::MCWinCOFFStreamer::FinishImpl(), llvm::MCObjectStreamer::FinishImpl(), forceExpAbs(), 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::MCCVLineEntry::Make(), llvm::MCDwarfLineEntry::Make(), llvm::MCGenDwarfLabelEntry::Make(), MakeStartMinusEndExpr(), nextReg(), printFPOReg(), and smallData().

◆ getCurrentSection()

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

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

Definition at line 311 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 210 of file MCStreamer.h.

References llvm::pdb::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 247 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 319 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 327 of file MCStreamer.h.

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

◆ getTargetStreamer()

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

◆ getWinFrameInfos()

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

Definition at line 248 of file MCStreamer.h.

Referenced by llvm::Win64EH::UnwindEmitter::Emit().

◆ 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 263 of file MCStreamer.h.

Referenced by makeCombineInst().

◆ hasUnfinishedDwarfFrameInfo()

bool MCStreamer::hasUnfinishedDwarfFrameInfo ( )

Definition at line 209 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 287 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 267 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 259 of file MCStreamer.h.

Referenced by llvm::X86AsmPrinter::EmitInstruction(), and llvm::WinException::endFunclet().

◆ 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 226 of file MCStreamer.h.

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

◆ 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 937 of file MCStreamer.cpp.

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

Referenced by llvm::Win64EH::UnwindEmitter::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::WebAssemblyTargetWasmStreamer::emitGlobal(), llvm::MCELFStreamer::EmitIdent(), llvm::MCWasmStreamer::EmitIdent(), llvm::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::Win64EH::UnwindEmitter::EmitUnwindInfo(), endSection(), llvm::MipsTargetELFStreamer::finish(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCELFStreamer::InitSections(), llvm::MCWinCOFFStreamer::InitSections(), InitSections(), makeCombineInst(), 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 380 of file MCStreamer.h.

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

◆ visitUsedExpr()

void MCStreamer::visitUsedExpr ( const MCExpr Expr)

◆ visitUsedSymbol()

void MCStreamer::visitUsedSymbol ( const MCSymbol Sym)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 834 of file MCStreamer.cpp.

Referenced by visitUsedExpr().


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