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

Streaming machine code generation interface. More...

#include <MCStreamer.h>

Inheritance diagram for llvm::MCStreamer:
[legend]

Public Member Functions

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
 
unsigned getNumWinFrameInfos ()
 
ArrayRef< 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 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 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)
 
virtual void EmitWinCFIEndProc ()
 
virtual void EmitWinCFIStartChained ()
 
virtual void EmitWinCFIEndChained ()
 
virtual void EmitWinCFIPushReg (unsigned Register)
 
virtual void EmitWinCFISetFrame (unsigned Register, unsigned Offset)
 
virtual void EmitWinCFIAllocStack (unsigned Size)
 
virtual void EmitWinCFISaveReg (unsigned Register, unsigned Offset)
 
virtual void EmitWinCFISaveXMM (unsigned Register, unsigned Offset)
 
virtual void EmitWinCFIPushFrame (bool Code)
 
virtual void EmitWinCFIEndProlog ()
 
virtual void EmitWinEHHandler (const MCSymbol *Sym, bool Unwind, bool Except)
 
virtual void EmitWinEHHandlerData ()
 
virtual void EmitInstruction (const MCInst &Inst, const MCSubtargetInfo &STI)
 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 Flush ()
 Causes any cached state to be written out. 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)
 Add a textual command. 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 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 AssignSection (MCSymbol *Symbol, MCSection *Section)
 Sets the symbol's section. More...
 
virtual void EmitLabel (MCSymbol *Symbol)
 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, unsigned Major, unsigned Minor, unsigned Update)
 Specify the MachO minimum deployment target version. More...
 
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)
 Emits a COFF section relative relocation. More...
 
virtual void emitELFSize (MCSymbolELF *Symbol, const MCExpr *Value)
 Emit an ELF .size 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 EmitValueImpl (const MCExpr *Value, unsigned Size, const 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, const 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, unsigned Padding=0)
 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 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 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 bool EmitValueToOffset (const MCExpr *Offset, unsigned char Value=0)
 Emit some number of copies of Value until the byte offset Offset is reached. More...
 

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

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

Constructor & Destructor Documentation

MCStreamer::MCStreamer ( MCContext Ctx)
protected
MCStreamer::~MCStreamer ( )
virtual

Definition at line 48 of file MCStreamer.cpp.

References getNumWinFrameInfos().

Member Function Documentation

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

AddBlankLine - Emit a blank line to a .s file to pretty it up.

Definition at line 266 of file MCStreamer.h.

Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), and llvm::StackMaps::serializeToStackMapSection().

virtual void llvm::MCStreamer::AddComment ( const Twine T)
inlinevirtual

Add a textual command.

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
.

Definition at line 252 of file MCStreamer.h.

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

void MCStreamer::AssignSection ( MCSymbol Symbol,
MCSection Section 
)
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::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 669 of file MCStreamer.cpp.

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, and llvm::MCELFStreamer.

Definition at line 679 of file MCStreamer.cpp.

Referenced by PopSection(), and SwitchSection().

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

Note in the output the specified Flag.

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

Definition at line 666 of file MCStreamer.cpp.

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

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

Referenced by emitAbsoluteSymbolDiff(), llvm::RecordStreamer::EmitAssignment(), llvm::MCObjectStreamer::EmitAssignment(), and forceExpAbs().

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

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

void MCStreamer::EmitBundleUnlock ( )
virtual

Ends a bundle-locked group.

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

Definition at line 699 of file MCStreamer.cpp.

void MCStreamer::EmitBytes ( StringRef  Data)
virtual
void MCStreamer::EmitCFIAdjustCfaOffset ( int64_t  Adjustment)
virtual
void MCStreamer::EmitCFIDefCfa ( int64_t  Register,
int64_t  Offset 
)
virtual
void MCStreamer::EmitCFIDefCfaOffset ( int64_t  Offset)
virtual
void MCStreamer::EmitCFIDefCfaRegister ( int64_t  Register)
virtual
void MCStreamer::EmitCFIEndProc ( )

Definition at line 242 of file MCStreamer.cpp.

References EmitCFIEndProcImpl().

void MCStreamer::EmitCFIEndProcImpl ( MCDwarfFrameInfo CurFrame)
protectedvirtual

Definition at line 248 of file MCStreamer.cpp.

References llvm::MCDwarfFrameInfo::End.

Referenced by EmitCFIEndProc().

void MCStreamer::EmitCFIEscape ( StringRef  Values)
virtual
void MCStreamer::EmitCFILsda ( const MCSymbol Sym,
unsigned  Encoding 
)
virtual
void MCStreamer::EmitCFIOffset ( int64_t  Register,
int64_t  Offset 
)
virtual
void MCStreamer::EmitCFIPersonality ( const MCSymbol Sym,
unsigned  Encoding 
)
virtual
void MCStreamer::EmitCFIRegister ( int64_t  Register1,
int64_t  Register2 
)
virtual
void MCStreamer::EmitCFIRelOffset ( int64_t  Register,
int64_t  Offset 
)
virtual
void MCStreamer::EmitCFIRememberState ( )
virtual
void MCStreamer::EmitCFIRestore ( int64_t  Register)
virtual
void MCStreamer::EmitCFIRestoreState ( )
virtual
void MCStreamer::EmitCFISameValue ( int64_t  Register)
virtual
void MCStreamer::EmitCFISections ( bool  EH,
bool  Debug 
)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 213 of file MCStreamer.cpp.

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

void MCStreamer::EmitCFISignalFrame ( )
virtual

Definition at line 364 of file MCStreamer.cpp.

References llvm::MCDwarfFrameInfo::IsSignalFrame.

void MCStreamer::EmitCFIStartProc ( bool  IsSimple)
void MCStreamer::EmitCFIStartProcImpl ( MCDwarfFrameInfo Frame)
protectedvirtual

Definition at line 239 of file MCStreamer.cpp.

Referenced by EmitCFIStartProc().

void MCStreamer::EmitCFIUndefined ( int64_t  Register)
virtual
void MCStreamer::EmitCFIWindowSave ( )
virtual
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 691 of file MCStreamer.cpp.

Referenced by llvm::ConstantPool::emitEntries().

void MCStreamer::EmitCOFFSafeSEH ( MCSymbol const Symbol)
virtual

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 559 of file MCStreamer.cpp.

void MCStreamer::EmitCOFFSecRel32 ( MCSymbol const Symbol)
virtual

Emits a COFF section relative relocation.

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

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 565 of file MCStreamer.cpp.

Referenced by EmitSymbolValue().

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

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::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 672 of file MCStreamer.cpp.

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::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 673 of file MCStreamer.cpp.

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::MCELFStreamer, and llvm::RecordStreamer.

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

Note in the output the specified region Kind.

Definition at line 385 of file MCStreamer.h.

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

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

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

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

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

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

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

Definition at line 184 of file MCStreamer.cpp.

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

Emit an ELF .size directive.

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

Reimplemented in llvm::MCELFStreamer.

Definition at line 674 of file MCStreamer.cpp.

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

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::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 671 of file MCStreamer.cpp.

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

Emit NumBytes bytes worth of the value specified by FillValue.

EmitFill - Emit NumBytes bytes worth of the value specified by FillValue.

This implements directives such as '.space'.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 136 of file MCStreamer.cpp.

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

Referenced by EmitGenDwarfRanges(), and EmitZeros().

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

References llvm::report_fatal_error().

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

References llvm::report_fatal_error().

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

Emit the "identifiers" directive.

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

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

Definition at line 627 of file MCStreamer.h.

void MCStreamer::EmitInstruction ( const MCInst Inst,
const MCSubtargetInfo STI 
)
virtual
void MCStreamer::EmitIntValue ( uint64_t  Value,
unsigned  Size 
)
virtual
void MCStreamer::EmitLabel ( MCSymbol Symbol)
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::MCELFStreamer, llvm::MCWinCOFFStreamer, and llvm::RecordStreamer.

Definition at line 203 of file MCStreamer.cpp.

References AssignSection(), llvm::MCTargetStreamer::emitLabel(), getCurrentSection(), getTargetStreamer(), llvm::MCSymbol::isVariable(), and fuzzer::TS.

Referenced by llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfDwoLineTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::ConstantPool::emitEntries(), llvm::MipsAsmPrinter::EmitFunctionEntryLabel(), EmitGenDwarfInfo(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::RecordStreamer::EmitLabel(), llvm::MCObjectStreamer::EmitLabel(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), emitNonLazySymbolPointer(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::EmitUnwindInfo(), EmitWinCFIAllocStack(), EmitWinCFIEndChained(), EmitWinCFIEndProc(), EmitWinCFIEndProlog(), EmitWinCFIPushFrame(), EmitWinCFIPushReg(), EmitWinCFISaveReg(), EmitWinCFISaveXMM(), EmitWinCFISetFrame(), EmitWinCFIStartChained(), EmitWinCFIStartProc(), endSection(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), llvm::MCGenDwarfLabelEntry::Make(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), and SwitchSection().

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

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

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::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 675 of file MCStreamer.cpp.

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

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

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

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

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

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

References llvm::errs().

Referenced by EmitRawText().

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

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

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

void MCStreamer::EmitSLEB128Value ( const MCExpr Value)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 687 of file MCStreamer.cpp.

virtual bool llvm::MCStreamer::EmitSymbolAttribute ( MCSymbol Symbol,
MCSymbolAttr  Attribute 
)
pure virtual
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::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 668 of file MCStreamer.cpp.

void MCStreamer::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.

Definition at line 115 of file MCStreamer.cpp.

References llvm::MCSymbolRefExpr::create(), EmitCOFFSecRel32(), EmitValueImpl(), and getContext().

Referenced by emitAbsoluteSymbolDiff(), emitDwarfSetLineAddr(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), and llvm::TargetLoweringObjectFileELF::emitPersonalityValue().

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::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 677 of file MCStreamer.cpp.

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::MCELFStreamer, and llvm::MCWinCOFFStreamer.

Definition at line 667 of file MCStreamer.cpp.

void MCStreamer::EmitULEB128IntValue ( uint64_t  Value,
unsigned  Padding = 0 
)

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

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

Definition at line 94 of file MCStreamer.cpp.

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

Referenced by llvm::MCDwarfLineTableHeader::Emit(), EmitAbbrev(), EmitDwarfLineTable(), emitDwarfSetLineAddr(), EmitGenDwarfAbbrev(), EmitGenDwarfInfo(), and llvm::MCObjectStreamer::EmitULEB128Value().

void MCStreamer::EmitULEB128Value ( const MCExpr Value)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 686 of file MCStreamer.cpp.

void MCStreamer::EmitValue ( const MCExpr Value,
unsigned  Size,
const SMLoc Loc = SMLoc() 
)
void MCStreamer::EmitValueImpl ( const MCExpr Value,
unsigned  Size,
const 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::MCELFStreamer, and llvm::MipsELFStreamer.

Definition at line 682 of file MCStreamer.cpp.

References visitUsedExpr().

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

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, and llvm::MCELFStreamer.

Definition at line 688 of file MCStreamer.cpp.

Referenced by llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::EmitRuntimeFunction(), and llvm::EmitUnwindInfo().

bool MCStreamer::EmitValueToOffset ( const MCExpr Offset,
unsigned char  Value = 0 
)
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.
Returns
false on success, true if the offset was invalid.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 693 of file MCStreamer.cpp.

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

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

Specify the MachO minimum deployment target version.

Definition at line 388 of file MCStreamer.h.

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, and llvm::MCELFStreamer.

Definition at line 680 of file MCStreamer.cpp.

void MCStreamer::EmitWinCFIAllocStack ( unsigned  Size)
virtual
void MCStreamer::EmitWinCFIEndChained ( )
virtual
void MCStreamer::EmitWinCFIEndProc ( )
virtual
void MCStreamer::EmitWinCFIEndProlog ( )
virtual
void MCStreamer::EmitWinCFIPushFrame ( bool  Code)
virtual
void MCStreamer::EmitWinCFIPushReg ( unsigned  Register)
virtual
void MCStreamer::EmitWinCFISaveReg ( unsigned  Register,
unsigned  Offset 
)
virtual
void MCStreamer::EmitWinCFISaveXMM ( unsigned  Register,
unsigned  Offset 
)
virtual
void MCStreamer::EmitWinCFISetFrame ( unsigned  Register,
unsigned  Offset 
)
virtual
void MCStreamer::EmitWinCFIStartChained ( )
virtual
void MCStreamer::EmitWinCFIStartProc ( const MCSymbol Symbol)
virtual
void MCStreamer::EmitWindowsUnwindTables ( )
protectedvirtual

Definition at line 582 of file MCStreamer.cpp.

void MCStreamer::EmitWinEHHandler ( const MCSymbol Sym,
bool  Unwind,
bool  Except 
)
virtual
void MCStreamer::EmitWinEHHandlerData ( )
virtual

Reimplemented in llvm::MCWinCOFFStreamer.

Definition at line 464 of file MCStreamer.cpp.

References llvm::WinEH::FrameInfo::ChainedParent, and llvm::report_fatal_error().

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

void MCStreamer::EmitZeros ( uint64_t  NumBytes)
virtual

Emit NumBytes worth of zeros.

The implementation in this class just redirects to EmitFill.

This function properly handles data in virtual sections.

Reimplemented in llvm::MCObjectStreamer.

Definition at line 143 of file MCStreamer.cpp.

References EmitFill().

void MCStreamer::EndCOFFSymbolDef ( )
virtual

Marks the end of the symbol definition.

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

Definition at line 670 of file MCStreamer.cpp.

MCSymbol * MCStreamer::endSection ( MCSection Section)
void MCStreamer::Finish ( )

Finish emission of machine code.

Definition at line 585 of file MCStreamer.cpp.

References llvm::MCTargetStreamer::finish(), FinishImpl(), getTargetStreamer(), llvm::report_fatal_error(), and fuzzer::TS.

void MCStreamer::FinishImpl ( )
virtual

Streamer specific finalization.

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

Definition at line 698 of file MCStreamer.cpp.

Referenced by Finish().

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

Causes any cached state to be written out.

Reimplemented in llvm::MCELFStreamer.

Definition at line 708 of file MCStreamer.h.

void MCStreamer::generateCompactUnwindEncodings ( MCAsmBackend MAB)
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 64 of file MCStreamer.cpp.

References llvm::nulls().

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

Definition at line 210 of file MCStreamer.h.

Referenced by llvm::AssemblerConstantPools::addEntry(), buildSymbolDiff(), llvm::MCELFStreamer::ChangeSection(), llvm::Win64EH::UnwindEmitter::Emit(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfLineTable::Emit(), llvm::MCDwarfLineAddr::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), llvm::EmitAbsDifference(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::MCWinCOFFStreamer::EmitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::EmitCOFFSecRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSectionIndex(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), EmitDwarfFileDirective(), EmitDwarfLineTable(), EmitDwarfLocDirective(), emitFDESymbol(), EmitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MipsELFStreamer::EmitInstruction(), llvm::EmitLabelDiff(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), emitNonLazySymbolPointer(), EmitPersonality(), llvm::EmitRuntimeFunction(), llvm::EmitSymbolRefWithOfs(), EmitSymbolValue(), llvm::Win64EH::UnwindEmitter::EmitUnwindInfo(), llvm::EmitUnwindInfo(), llvm::MCObjectStreamer::EmitValueToOffset(), llvm::MCELFStreamer::EmitWeakReference(), EmitWinCFIAllocStack(), EmitWinCFIEndChained(), EmitWinCFIEndProc(), EmitWinCFIEndProlog(), EmitWinCFIPushFrame(), EmitWinCFIPushReg(), EmitWinCFISaveReg(), EmitWinCFISaveXMM(), EmitWinCFISetFrame(), EmitWinCFIStartChained(), EmitWinCFIStartProc(), llvm::MCObjectStreamer::FinishImpl(), forceExpAbs(), getDataAlignmentFactor(), getDwarfLineTableSymbol(), llvm::SparcELFMCAsmInfo::getExprForFDESymbol(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::SparcELFMCAsmInfo::getExprForPersonalitySymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(), getSizeForEncoding(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCWinCOFFStreamer::InitSections(), llvm::MCELFStreamer::InitSections(), InitSections(), llvm::MCLineEntry::Make(), llvm::MCGenDwarfLabelEntry::Make(), and MakeStartMinusEndExpr().

MCSectionSubPair llvm::MCStreamer::getCurrentSection ( ) const
inline
MCSection* llvm::MCStreamer::getCurrentSectionOnly ( ) const
inline
WinEH::FrameInfo* llvm::MCStreamer::getCurrentWinFrameInfo ( )
inlineprotected

Definition at line 188 of file MCStreamer.h.

ArrayRef<MCDwarfFrameInfo> llvm::MCStreamer::getDwarfFrameInfos ( ) const
inline
MCSymbol * MCStreamer::getDwarfLineTableSymbol ( unsigned  CUID)
virtual
unsigned llvm::MCStreamer::getNumFrameInfos ( )
inline
unsigned llvm::MCStreamer::getNumWinFrameInfos ( )
inline

Definition at line 221 of file MCStreamer.h.

Referenced by reset(), and ~MCStreamer().

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

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

Definition at line 282 of file MCStreamer.h.

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

Referenced by PushSection().

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

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

MCTargetStreamer* llvm::MCStreamer::getTargetStreamer ( )
inline
ArrayRef<WinEH::FrameInfo *> llvm::MCStreamer::getWinFrameInfos ( ) const
inline

Definition at line 222 of file MCStreamer.h.

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

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

void MCStreamer::InitSections ( bool  NoExecStack)
virtual

Create the default sections and set the initial one.

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

Definition at line 188 of file MCStreamer.cpp.

References getContext(), and SwitchSection().

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

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

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

Definition at line 233 of file MCStreamer.h.

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

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

Reimplemented in llvm::MCObjectStreamer.

Definition at line 715 of file MCStreamer.h.

Referenced by llvm::MCContext::finalizeDwarfSections().

bool llvm::MCStreamer::PopSection ( )
inline
void llvm::MCStreamer::PushSection ( )
inline
void MCStreamer::reset ( )
virtual
void llvm::MCStreamer::setTargetStreamer ( MCTargetStreamer TS)
inline

Definition at line 202 of file MCStreamer.h.

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

bool llvm::MCStreamer::SubSection ( const MCExpr Subsection)
inline
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 701 of file MCStreamer.cpp.

References 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::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), emitConstantPool(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), EmitDwarfLineTable(), llvm::MipsAsmPrinter::EmitEndOfAsmFile(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCELFStreamer::EmitIdent(), llvm::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::Win64EH::UnwindEmitter::EmitUnwindInfo(), endSection(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCWinCOFFStreamer::InitSections(), llvm::MCELFStreamer::InitSections(), InitSections(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), SubSection(), and llvm::MipsELFStreamer::SwitchSection().

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

References llvm::SmallVectorTemplateCommon< T, typename >::back().

void MCStreamer::visitUsedExpr ( const MCExpr Expr)
void MCStreamer::visitUsedSymbol ( const MCSymbol Sym)
virtual

Reimplemented in llvm::MCObjectStreamer.

Definition at line 610 of file MCStreamer.cpp.

Referenced by visitUsedExpr().


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