LLVM API Documentation
#include <MCStreamer.h>
Public Member Functions | |
virtual | ~MCStreamer () |
virtual void | reset () |
MCContext & | getContext () const |
MCTargetStreamer & | getTargetStreamer () |
unsigned | getNumFrameInfos () |
const MCDwarfFrameInfo & | getFrameInfo (unsigned i) |
ArrayRef< MCDwarfFrameInfo > | getFrameInfos () const |
unsigned | getNumW64UnwindInfos () |
MCWin64EHUnwindInfo & | getW64UnwindInfo (unsigned i) |
void | generateCompactUnwindEncodings (MCAsmBackend *MAB) |
virtual void | EmitFileDirective (StringRef Filename)=0 |
virtual void | EmitIdent (StringRef IdentString) |
virtual bool | EmitDwarfFileDirective (unsigned FileNo, StringRef Directory, StringRef Filename, unsigned CUID=0) |
virtual void | EmitDwarfLocDirective (unsigned FileNo, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator, StringRef FileName) |
EmitDwarfLocDirective - This implements the DWARF2. More... | |
virtual void | EmitDwarfAdvanceLineAddr (int64_t LineDelta, const MCSymbol *LastLabel, const MCSymbol *Label, unsigned PointerSize)=0 |
virtual void | EmitDwarfAdvanceFrameAddr (const MCSymbol *LastLabel, const MCSymbol *Label) |
void | EmitDwarfSetLineAddr (int64_t LineDelta, const MCSymbol *Label, int PointerSize) |
virtual void | EmitCompactUnwindEncoding (uint32_t CompactUnwindEncoding) |
virtual void | EmitCFISections (bool EH, bool Debug) |
void | EmitCFIStartProc () |
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 | EmitWin64EHStartProc (const MCSymbol *Symbol) |
virtual void | EmitWin64EHEndProc () |
virtual void | EmitWin64EHStartChained () |
virtual void | EmitWin64EHEndChained () |
virtual void | EmitWin64EHHandler (const MCSymbol *Sym, bool Unwind, bool Except) |
virtual void | EmitWin64EHHandlerData () |
virtual void | EmitWin64EHPushReg (unsigned Register) |
virtual void | EmitWin64EHSetFrame (unsigned Register, unsigned Offset) |
virtual void | EmitWin64EHAllocStack (unsigned Size) |
virtual void | EmitWin64EHSaveReg (unsigned Register, unsigned Offset) |
virtual void | EmitWin64EHSaveXMM (unsigned Register, unsigned Offset) |
virtual void | EmitWin64EHPushFrame (bool Code) |
virtual void | EmitWin64EHEndProlog () |
virtual void | EmitInstruction (const MCInst &Inst)=0 |
virtual void | EmitBundleAlignMode (unsigned AlignPow2)=0 |
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. More... | |
virtual void | EmitBundleLock (bool AlignToEnd)=0 |
The following instructions are a bundle-locked group. More... | |
virtual void | EmitBundleUnlock ()=0 |
Ends a bundle-locked group. More... | |
void | EmitRawText (const Twine &String) |
virtual void | Flush () |
Flush - Causes any cached state to be written out. More... | |
virtual void | FinishImpl ()=0 |
FinishImpl - Streamer specific finalization. More... | |
void | Finish () |
Finish - Finish emission of machine code. More... | |
Assembly File Formatting. | |
virtual bool | isVerboseAsm () const |
virtual bool | hasRawTextSupport () const |
virtual void | AddComment (const Twine &T) |
virtual raw_ostream & | GetCommentOS () |
virtual void | AddBlankLine () |
AddBlankLine - Emit a blank line to a .s file to pretty it up. More... | |
Symbol & Section Management | |
MCSectionSubPair | getCurrentSection () const |
MCSectionSubPair | getPreviousSection () const |
unsigned | GetSymbolOrder (const MCSymbol *Sym) const |
virtual void | ChangeSection (const MCSection *, const MCExpr *)=0 |
void | PushSection () |
bool | PopSection () |
bool | SubSection (const MCExpr *Subsection) |
void | SwitchSection (const MCSection *Section, const MCExpr *Subsection=0) |
void | SwitchSectionNoChange (const MCSection *Section, const MCExpr *Subsection=0) |
void | InitStreamer () |
Initialize the streamer. More... | |
void | setAutoInitSections (bool AutoInitSections) |
Tell this MCStreamer to call InitSections upon initialization. More... | |
virtual void | InitSections ()=0 |
InitSections - Create the default sections and set the initial one. More... | |
virtual void | InitToTextSection ()=0 |
InitToTextSection - Create a text section and switch the streamer to it. More... | |
void | AssignSection (MCSymbol *Symbol, const MCSection *Section) |
virtual void | EmitLabel (MCSymbol *Symbol) |
virtual void | EmitDebugLabel (MCSymbol *Symbol) |
virtual void | EmitEHSymAttributes (const MCSymbol *Symbol, MCSymbol *EHSymbol) |
virtual void | EmitAssemblerFlag (MCAssemblerFlag Flag)=0 |
EmitAssemblerFlag - Note in the output the specified Flag . More... | |
virtual void | EmitLinkerOptions (ArrayRef< std::string > Kind) |
virtual void | EmitDataRegion (MCDataRegionType Kind) |
EmitDataRegion - Note in the output the specified region Kind . More... | |
virtual void | EmitThumbFunc (MCSymbol *Func)=0 |
virtual MCSymbolData & | getOrCreateSymbolData (MCSymbol *Symbol) |
getOrCreateSymbolData - Get symbol data for given symbol. More... | |
virtual void | EmitAssignment (MCSymbol *Symbol, const MCExpr *Value)=0 |
virtual void | EmitWeakReference (MCSymbol *Alias, const MCSymbol *Symbol)=0 |
virtual bool | EmitSymbolAttribute (MCSymbol *Symbol, MCSymbolAttr Attribute)=0 |
EmitSymbolAttribute - Add the given Attribute to Symbol . More... | |
virtual void | EmitSymbolDesc (MCSymbol *Symbol, unsigned DescValue)=0 |
virtual void | BeginCOFFSymbolDef (const MCSymbol *Symbol)=0 |
virtual void | EmitCOFFSymbolStorageClass (int StorageClass)=0 |
virtual void | EmitCOFFSymbolType (int Type)=0 |
virtual void | EndCOFFSymbolDef ()=0 |
EndCOFFSymbolDef - Marks the end of the symbol definition. More... | |
virtual void | EmitCOFFSecRel32 (MCSymbol const *Symbol) |
virtual void | EmitELFSize (MCSymbol *Symbol, const MCExpr *Value)=0 |
virtual void | EmitCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)=0 |
virtual void | EmitLocalCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)=0 |
virtual void | EmitZerofill (const MCSection *Section, MCSymbol *Symbol=0, uint64_t Size=0, unsigned ByteAlignment=0)=0 |
virtual void | EmitTBSSSymbol (const MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment=0)=0 |
Generating Data | |
virtual void | EmitBytes (StringRef Data)=0 |
virtual void | EmitValueImpl (const MCExpr *Value, unsigned Size)=0 |
void | EmitValue (const MCExpr *Value, unsigned Size) |
virtual void | EmitIntValue (uint64_t Value, unsigned Size) |
void | EmitAbsValue (const MCExpr *Value, unsigned Size) |
virtual void | EmitULEB128Value (const MCExpr *Value)=0 |
virtual void | EmitSLEB128Value (const MCExpr *Value)=0 |
void | EmitULEB128IntValue (uint64_t Value, unsigned Padding=0) |
void | EmitSLEB128IntValue (int64_t Value) |
void | EmitSymbolValue (const MCSymbol *Sym, unsigned Size) |
virtual void | EmitGPRel64Value (const MCExpr *Value) |
virtual void | EmitGPRel32Value (const MCExpr *Value) |
virtual void | EmitFill (uint64_t NumBytes, uint8_t FillValue) |
virtual void | EmitZeros (uint64_t NumBytes) |
Emit NumBytes worth of zeros. This function properly handles data in virtual sections. More... | |
virtual void | EmitValueToAlignment (unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)=0 |
virtual void | EmitCodeAlignment (unsigned ByteAlignment, unsigned MaxBytesToEmit=0)=0 |
virtual bool | EmitValueToOffset (const MCExpr *Offset, unsigned char Value=0)=0 |
Protected Member Functions | |
MCStreamer (MCContext &Ctx, MCTargetStreamer *TargetStreamer) | |
const MCExpr * | BuildSymbolDiff (MCContext &Context, const MCSymbol *A, const MCSymbol *B) |
const MCExpr * | ForceExpAbs (const MCExpr *Expr) |
void | RecordProcStart (MCDwarfFrameInfo &Frame) |
virtual void | EmitCFIStartProcImpl (MCDwarfFrameInfo &Frame) |
void | RecordProcEnd (MCDwarfFrameInfo &Frame) |
virtual void | EmitCFIEndProcImpl (MCDwarfFrameInfo &CurFrame) |
void | EmitFrames (MCAsmBackend *MAB, bool usingCFI) |
MCWin64EHUnwindInfo * | getCurrentW64UnwindInfo () |
void | EmitW64Tables () |
virtual void | EmitRawTextImpl (StringRef String) |
MCStreamer - 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 108 of file MCStreamer.h.
|
protected |
Definition at line 29 of file MCStreamer.cpp.
References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::MCTargetStreamer::setStreamer().
|
virtual |
Definition at line 38 of file MCStreamer.cpp.
References getNumW64UnwindInfos().
|
inlinevirtual |
AddBlankLine - Emit a blank line to a .s file to pretty it up.
Definition at line 215 of file MCStreamer.h.
Referenced by llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::doInitialization(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::AsmPrinter::EmitFunctionBody(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::AsmPrinter::emitImplicitDef(), emitKill(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), and llvm::DwarfException::EmitTypeInfos().
|
inlinevirtual |
AddComment - Add a comment 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 207 of file MCStreamer.h.
Referenced by llvm::AsmPrinter::doInitialization(), emitBasicBlockLoopComments(), llvm::AsmPrinter::EmitBasicBlockStart(), llvm::AsmPrinter::EmitCFAByte(), llvm::DwarfDebug::emitDIE(), llvm::ARMAsmPrinter::EmitDwarfRegOp(), llvm::AsmPrinter::EmitDwarfRegOp(), llvm::AsmPrinter::EmitEncodingByte(), EmitEncodingByte(), llvm::DwarfException::EmitExceptionTable(), llvm::AsmPrinter::EmitFunctionBody(), llvm::AsmPrinter::EmitFunctionHeader(), llvm::CompileUnit::emitHeader(), llvm::AsmPrinter::emitImplicitDef(), llvm::X86AsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), emitKill(), llvm::AsmPrinter::EmitSLEB128(), EmitSymbol(), llvm::DwarfException::EmitTypeInfos(), llvm::AsmPrinter::EmitULEB128(), and llvm::DwarfUnits::emitUnits().
AssignSection - 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 201 of file MCStreamer.cpp.
References llvm::MCSymbol::setSection(), llvm::MCSymbol::setUndefined(), and llvm::ARMBuildAttrs::Symbol.
Referenced by llvm::MCELFStreamer::EmitCommonSymbol(), EmitDebugLabel(), and EmitLabel().
|
pure virtual |
BeginCOFFSymbolDef - Start emitting COFF symbol definition
Symbol | - The symbol to have its External & Type fields set. |
Implemented in llvm::MCELFStreamer.
Referenced by llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), and llvm::X86AsmPrinter::runOnMachineFunction().
|
protected |
Definition at line 55 of file MCStreamer.cpp.
References llvm::MCSymbolRefExpr::Create(), llvm::MCBinaryExpr::Create(), llvm::MCBinaryExpr::Sub, and llvm::MCSymbolRefExpr::VK_None.
Referenced by llvm::MCObjectStreamer::EmitDwarfAdvanceFrameAddr(), and llvm::MCObjectStreamer::EmitDwarfAdvanceLineAddr().
ChangeSection - Update streamer for a new active section.
This is called by PopSection and SwitchSection, if the current section changes.
Implemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Referenced by PopSection(), and SwitchSection().
EmitAbsValue - Emit the Value, but try to avoid relocations. On MachO this is done by producing foo = value .long foo
Definition at line 135 of file MCStreamer.cpp.
References EmitValue(), and ForceExpAbs().
Referenced by llvm::EmitAbsDifference(), llvm::MCDwarfFileTable::EmitCU(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), and EmitSymbol().
|
pure virtual |
EmitAssemblerFlag - Note in the output the specified Flag
.
Implemented in llvm::MCELFStreamer.
Referenced by llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitFunctionEntryLabel(), and llvm::ARMAsmPrinter::EmitStartOfAsmFile().
|
pure virtual |
EmitAssignment - 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.
Symbol | - The symbol being assigned to. |
Value | - The value for the symbol. |
Implemented in llvm::MCObjectStreamer.
Referenced by llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::AsmPrinter::EmitLabelDifference(), llvm::AsmPrinter::EmitLabelOffsetDifference(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), and ForceExpAbs().
|
pure 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.
Implemented in llvm::MCObjectStreamer.
|
pure virtual |
The following instructions are a bundle-locked group.
AlignToEnd | - If true, the bundle-locked group will be aligned to the end of a bundle. |
Implemented in llvm::MCObjectStreamer.
|
pure virtual |
Ends a bundle-locked group.
Implemented in llvm::MCObjectStreamer.
|
pure virtual |
EmitBytes - Emit the bytes in Data
into the output.
This is used to implement assembler directives such as .byte, .ascii, etc.
Implemented in llvm::MCObjectStreamer.
Referenced by llvm::MCDwarfLineAddr::Emit(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), llvm::MCDwarfFileTable::EmitCU(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), EmitGenDwarfInfo(), emitGlobalConstantDataSequential(), EmitIntValue(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), EmitSLEB128IntValue(), llvm::DwarfUnits::emitStrings(), EmitULEB128IntValue(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
|
virtual |
Definition at line 302 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createAdjustCfaOffset(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 286 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfa(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by llvm::AsmPrinter::emitCFIInstruction().
|
virtual |
Definition at line 294 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfaOffset(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by llvm::AsmPrinter::emitCFIInstruction().
|
virtual |
Definition at line 310 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfaRegister(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by llvm::AsmPrinter::emitCFIInstruction().
void MCStreamer::EmitCFIEndProc | ( | ) |
Definition at line 265 of file MCStreamer.cpp.
References EmitCFIEndProcImpl().
Referenced by llvm::DwarfCFIException::EndFunction().
|
protectedvirtual |
Definition at line 271 of file MCStreamer.cpp.
Referenced by EmitCFIEndProc().
|
virtual |
Definition at line 380 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createEscape(), and llvm::MCDwarfFrameInfo::Instructions.
Definition at line 342 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::Lsda, and llvm::MCDwarfFrameInfo::LsdaEncoding.
Referenced by llvm::DwarfCFIException::BeginFunction().
|
virtual |
Definition at line 318 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createOffset(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by llvm::AsmPrinter::emitCFIInstruction().
Definition at line 334 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::Personality, and llvm::MCDwarfFrameInfo::PersonalityEncoding.
Referenced by llvm::DwarfCFIException::BeginFunction().
|
virtual |
Definition at line 401 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRegister(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by llvm::AsmPrinter::emitCFIInstruction().
|
virtual |
Definition at line 326 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRelOffset(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 349 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRememberState(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 372 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRestore(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 356 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRestoreState(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 364 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createSameValue(), and llvm::MCDwarfFrameInfo::Instructions.
Definition at line 232 of file MCStreamer.cpp.
References Debug.
Referenced by llvm::DwarfCFIException::EndModule().
|
virtual |
Definition at line 387 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::IsSignalFrame.
void MCStreamer::EmitCFIStartProc | ( | ) |
Definition at line 238 of file MCStreamer.cpp.
References EmitCFIStartProcImpl(), llvm::MCDwarfFrameInfo::End, and llvm::report_fatal_error().
Referenced by llvm::DwarfCFIException::BeginFunction().
|
protectedvirtual |
Definition at line 249 of file MCStreamer.cpp.
Referenced by EmitCFIStartProc().
|
virtual |
Definition at line 393 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createUndefined(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 409 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createWindowSave(), and llvm::MCDwarfFrameInfo::Instructions.
Referenced by llvm::AsmPrinter::emitCFIInstruction().
|
pure virtual |
EmitCodeAlignment - 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.
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. |
Implemented in llvm::MCObjectStreamer.
Referenced by llvm::AsmPrinter::EmitAlignment().
|
virtual |
EmitCOFFSecRel32 - Emits a COFF section relative relocation.
Symbol | - Symbol the section relative realocation should point to. |
Definition at line 569 of file MCStreamer.cpp.
References llvm_unreachable.
Referenced by llvm::AsmPrinter::EmitLabelPlusOffset(), and llvm::AsmPrinter::EmitSectionOffset().
|
pure virtual |
EmitCOFFSymbolStorageClass - Emit the storage class of the symbol.
StorageClass | - The storage class the symbol should have. |
Implemented in llvm::MCELFStreamer.
Referenced by llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), and llvm::X86AsmPrinter::runOnMachineFunction().
|
pure virtual |
EmitCOFFSymbolType - Emit the type of the symbol.
Implemented in llvm::MCELFStreamer.
Referenced by llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), and llvm::X86AsmPrinter::runOnMachineFunction().
|
pure virtual |
EmitCommonSymbol - Emit a common symbol.
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::MCELFStreamer.
Referenced by llvm::AsmPrinter::EmitGlobalVariable().
|
virtual |
Definition at line 226 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::CompactUnwindEncoding.
Referenced by llvm::AsmPrinter::emitPrologLabel().
|
inlinevirtual |
EmitDataRegion - Note in the output the specified region Kind
.
Definition at line 351 of file MCStreamer.h.
Referenced by llvm::ARMAsmPrinter::EmitFunctionBodyEnd(), llvm::MipsAsmPrinter::EmitFunctionBodyEnd(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitJump2Table(), llvm::ARMAsmPrinter::EmitJumpTable(), and llvm::AsmPrinter::EmitJumpTableInfo().
|
virtual |
Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Definition at line 219 of file MCStreamer.cpp.
References AssignSection(), getCurrentSection(), llvm::MCSymbol::isVariable(), and llvm::ARMBuildAttrs::Symbol.
Referenced by llvm::DwarfCFIException::BeginFunction().
|
inlinevirtual |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 605 of file MCStreamer.h.
|
pure virtual |
Implemented in llvm::MCObjectStreamer.
Referenced by EmitDwarfLineTable().
|
virtual |
EmitDwarfFileDirective - Associate a filename with a specified logical file number. This implements the DWARF2 '.file 4 "foo.c"' assembler directive.
Definition at line 170 of file MCStreamer.cpp.
References getContext(), and llvm::MCContext::GetDwarfFile().
Referenced by llvm::DwarfDebug::getOrCreateSourceID().
|
virtual |
EmitDwarfLocDirective - This implements the DWARF2.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 176 of file MCStreamer.cpp.
References getContext(), and llvm::MCContext::setCurrentDwarfLoc().
Referenced by llvm::MCObjectStreamer::EmitDwarfLocDirective().
void MCStreamer::EmitDwarfSetLineAddr | ( | int64_t | LineDelta, |
const MCSymbol * | Label, | ||
int | PointerSize | ||
) |
Definition at line 90 of file MCStreamer.cpp.
References llvm::dwarf::DW_LNE_set_address, llvm::dwarf::DW_LNS_extended_op, llvm::MCDwarfLineAddr::Emit(), EmitIntValue(), EmitSymbolValue(), and EmitULEB128IntValue().
Referenced by llvm::MCObjectStreamer::EmitDwarfAdvanceLineAddr().
Definition at line 197 of file MCStreamer.cpp.
EmitELFSize - Emit an ELF .size directive.
This corresponds to an assembler statement such as: .size symbol, expression
Implemented in llvm::MCELFStreamer.
Referenced by llvm::AsmPrinter::EmitFunctionBody(), llvm::AsmPrinter::EmitGlobalVariable(), and llvm::TargetLoweringObjectFileELF::emitPersonalityValue().
|
pure virtual |
EmitFileDirective - Switch to a new logical file. This is used to implement the '.file "foo.c"' assembler directive.
Implemented in llvm::MCELFStreamer.
Referenced by llvm::AsmPrinter::doInitialization().
|
virtual |
EmitFill - Emit NumBytes bytes worth of the value specified by FillValue. This implements directives such as '.space'.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 159 of file MCStreamer.cpp.
References llvm::MCConstantExpr::Create(), EmitValue(), and getContext().
Referenced by emitGlobalConstantArray(), emitGlobalConstantDataSequential(), and EmitZeros().
|
protected |
Definition at line 587 of file MCStreamer.cpp.
References llvm::MCDwarfFrameEmitter::Emit(), and getNumFrameInfos().
Referenced by llvm::MCELFStreamer::FinishImpl().
|
virtual |
EmitGPRel32Value - 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 153 of file MCStreamer.cpp.
References llvm::report_fatal_error().
|
virtual |
EmitGPRel64Value - 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 149 of file MCStreamer.cpp.
References llvm::report_fatal_error().
|
inlinevirtual |
Emit the "identifiers" directive. This implements the '.ident "version foo"' assembler directive.
Reimplemented in llvm::MCELFStreamer.
Definition at line 585 of file MCStreamer.h.
|
pure virtual |
EmitInstruction - Emit the given Instruction
into the current section.
Implemented in llvm::MCObjectStreamer.
Referenced by llvm::AsmPrinter::EmitFunctionBody(), llvm::SystemZAsmPrinter::EmitInstruction(), llvm::HexagonAsmPrinter::EmitInstruction(), llvm::AMDGPUAsmPrinter::EmitInstruction(), llvm::AArch64AsmPrinter::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitJump2Table(), LowerPATCHPOINT(), LowerSTACKMAP(), and LowerTlsAddr().
|
virtual |
EmitIntValue - Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
Definition at line 104 of file MCStreamer.cpp.
References EmitBytes(), llvm::MCContext::getAsmInfo(), llvm::isIntN(), llvm::MCAsmInfo::isLittleEndian(), and llvm::isUIntN().
Referenced by llvm::DwarfUnits::emitAddresses(), llvm::AsmPrinter::EmitCFAByte(), llvm::MCDwarfFileTable::EmitCU(), EmitDwarfLineTable(), EmitDwarfSetLineAddr(), llvm::AsmPrinter::EmitEncodingByte(), EmitEncodingByte(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::DwarfException::EmitExceptionTable(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), llvm::AsmPrinter::EmitGlobalConstant(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), emitGlobalConstantLargeInt(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::MCELFStreamer::EmitIdent(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::AsmPrinter::EmitInt16(), llvm::AsmPrinter::EmitInt32(), llvm::AsmPrinter::EmitInt8(), llvm::MipsReginfo::emitMipsReginfoSectionCG(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::AMDGPUAsmPrinter::EmitProgramInfoR600(), llvm::AMDGPUAsmPrinter::EmitProgramInfoSI(), llvm::DwarfUnits::emitStrings(), llvm::AsmPrinter::EmitTTypeReference(), llvm::EmitUnwindCode(), llvm::EmitUnwindInfo(), llvm::DIEInteger::EmitValue(), llvm::MCObjectStreamer::EmitValueImpl(), and llvm::StackMaps::serializeToStackMapSection().
|
virtual |
EmitLabel - Emit a label for Symbol
into the current section.
This corresponds to an assembler statement such as: foo:
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, and llvm::MCELFStreamer.
Definition at line 212 of file MCStreamer.cpp.
References AssignSection(), getCurrentSection(), llvm::MCSymbol::isVariable(), and llvm::ARMBuildAttrs::Symbol.
Referenced by llvm::ARMException::BeginFunction(), llvm::Win64Exception::BeginFunction(), llvm::DwarfDebug::beginFunction(), llvm::DwarfDebug::beginInstruction(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), llvm::AsmPrinter::EmitBasicBlockStart(), EmitCamlGlobal(), llvm::AsmPrinter::EmitConstantPool(), llvm::MCDwarfFileTable::EmitCU(), EmitDwarfLineTable(), llvm::SystemZAsmPrinter::EmitEndOfAsmFile(), llvm::AArch64AsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::DwarfException::EmitExceptionTable(), llvm::AsmPrinter::EmitFunctionBody(), llvm::ARMAsmPrinter::EmitFunctionEntryLabel(), llvm::MipsAsmPrinter::EmitFunctionEntryLabel(), llvm::AsmPrinter::EmitFunctionEntryLabel(), llvm::AsmPrinter::EmitFunctionHeader(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::X86AsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitJump2Table(), llvm::ARMAsmPrinter::EmitJumpTable(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::MCObjectStreamer::EmitLabel(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), emitSectionSym(), llvm::DwarfUnits::emitStrings(), llvm::DwarfUnits::emitUnits(), llvm::EmitUnwindInfo(), EmitWin64EHAllocStack(), EmitWin64EHEndChained(), EmitWin64EHEndProc(), EmitWin64EHEndProlog(), EmitWin64EHPushFrame(), EmitWin64EHPushReg(), EmitWin64EHSaveReg(), EmitWin64EHSaveXMM(), EmitWin64EHSetFrame(), EmitWin64EHStartChained(), EmitWin64EHStartProc(), llvm::DwarfCFIException::EndFunction(), llvm::ARMException::EndFunction(), llvm::Win64Exception::EndFunction(), llvm::DwarfDebug::endFunction(), llvm::DwarfDebug::endInstruction(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::TargetLoweringObjectFile::getTTypeReference(), llvm::MCLineEntry::Make(), llvm::MCGenDwarfLabelEntry::Make(), RecordProcEnd(), RecordProcStart(), and llvm::StackMaps::serializeToStackMapSection().
|
inlinevirtual |
EmitLinkerOptions - Emit the given list Options
of strings as linker options into the output.
Definition at line 348 of file MCStreamer.h.
Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleFlags().
|
pure virtual |
EmitLocalCommonSymbol - Emit a local common (.lcomm) symbol.
Symbol | - The common symbol to emit. |
Size | - The size of the common symbol. |
ByteAlignment | - The alignment of the common symbol in bytes. |
Implemented in llvm::MCELFStreamer.
Referenced by llvm::AsmPrinter::EmitGlobalVariable().
void MCStreamer::EmitRawText | ( | const Twine & | String | ) |
EmitRawText - 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 582 of file MCStreamer.cpp.
References EmitRawTextImpl(), and llvm::Twine::toStringRef().
Referenced by llvm::HexagonAsmPrinter::EmitAlignment(), llvm::AsmPrinter::EmitBasicBlockStart(), emitDebugValueComment(), llvm::MipsAsmPrinter::emitFrameDirective(), llvm::AsmPrinter::EmitFunctionBody(), llvm::MipsAsmPrinter::EmitFunctionBodyEnd(), llvm::MipsAsmPrinter::EmitFunctionBodyStart(), llvm::MipsAsmPrinter::EmitFunctionEntryLabel(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::DIEInteger::EmitValue(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
|
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 576 of file MCStreamer.cpp.
References llvm::errs().
Referenced by EmitRawText().
void MCStreamer::EmitSLEB128IntValue | ( | int64_t | Value | ) |
EmitSLEB128Value - Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integers.
Definition at line 128 of file MCStreamer.cpp.
References EmitBytes(), llvm::encodeSLEB128(), and llvm::raw_svector_ostream::str().
Referenced by llvm::AsmPrinter::EmitSLEB128(), and llvm::MCObjectStreamer::EmitSLEB128Value().
|
pure virtual |
Implemented in llvm::MCObjectStreamer.
|
pure virtual |
EmitSymbolAttribute - Add the given Attribute
to Symbol
.
Implemented in llvm::MCELFStreamer.
Referenced by llvm::AsmPrinter::doFinalization(), EmitCamlGlobal(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::AsmPrinter::EmitFunctionHeader(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), and llvm::ARMException::EndFunction().
|
pure virtual |
EmitSymbolDesc - Set the DescValue
for the Symbol
.
Symbol | - The symbol to have its n_desc field set. |
DescValue | - The value to set into the n_desc field. |
Implemented in llvm::MCELFStreamer.
EmitSymbolValue - Special case of EmitValue that avoids the client having to pass in a MCExpr for MCSymbols.
Definition at line 145 of file MCStreamer.cpp.
References llvm::MCSymbolRefExpr::Create(), EmitValueImpl(), and getContext().
Referenced by EmitDwarfSetLineAddr(), llvm::SystemZAsmPrinter::EmitEndOfAsmFile(), llvm::AArch64AsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::AsmPrinter::EmitLabelDifference(), llvm::AsmPrinter::EmitLabelOffsetDifference(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), and llvm::AsmPrinter::EmitSectionOffset().
|
pure virtual |
EmitTBSSSymbol - Emit a thread local bss (.tbss) symbol.
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. |
Implemented in llvm::MCELFStreamer.
Referenced by llvm::AsmPrinter::EmitGlobalVariable().
|
pure virtual |
EmitThumbFunc - Note in the output that the specified Func
is a Thumb mode function (ARM target only).
Implemented in llvm::MCELFStreamer.
Referenced by llvm::ARMAsmPrinter::EmitFunctionEntryLabel().
void MCStreamer::EmitULEB128IntValue | ( | uint64_t | Value, |
unsigned | Padding = 0 |
||
) |
EmitULEB128Value - Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integers.
Definition at line 119 of file MCStreamer.cpp.
References EmitBytes(), llvm::encodeULEB128(), and llvm::raw_svector_ostream::str().
Referenced by EmitAbbrev(), llvm::MCDwarfFileTable::EmitCU(), EmitDwarfLineTable(), EmitDwarfSetLineAddr(), EmitGenDwarfAbbrev(), EmitGenDwarfInfo(), llvm::AsmPrinter::EmitULEB128(), and llvm::MCObjectStreamer::EmitULEB128Value().
|
pure virtual |
Implemented in llvm::MCObjectStreamer.
Definition at line 141 of file MCStreamer.cpp.
References EmitValueImpl().
Referenced by EmitAbsValue(), llvm::DwarfUnits::emitAddresses(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), EmitFill(), emitGlobalConstantImpl(), llvm::ARMAsmPrinter::EmitJump2Table(), llvm::ARMAsmPrinter::EmitJumpTable(), llvm::AsmPrinter::EmitLabelDifference(), llvm::AsmPrinter::EmitLabelOffsetDifference(), llvm::AsmPrinter::EmitLabelPlusOffset(), llvm::SystemZAsmPrinter::EmitMachineConstantPoolValue(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), EmitPersonality(), llvm::EmitRuntimeFunction(), llvm::EmitSymbolRefWithOfs(), llvm::AsmPrinter::EmitTTypeReference(), llvm::EmitUnwindInfo(), llvm::DIEExpr::EmitValue(), llvm::ARMAsmPrinter::EmitXXStructor(), llvm::Win64Exception::EndFunction(), and llvm::StackMaps::serializeToStackMapSection().
EmitValue - 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.
Value | - The value to emit. |
Size | - The size of the integer (in bytes) to emit. This must match a native machine width. |
Implemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Referenced by EmitSymbolValue(), and EmitValue().
|
pure virtual |
EmitValueToAlignment - 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.
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. |
Implemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Referenced by llvm::MCDwarfFrameEmitter::Emit(), llvm::AsmPrinter::EmitAlignment(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::EmitRuntimeFunction(), and llvm::EmitUnwindInfo().
|
pure virtual |
EmitValueToOffset - Emit some number of copies of Value
until the byte offset Offset
is reached.
This is used to implement assembler directives such as .org.
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. |
Implemented in llvm::MCObjectStreamer.
|
protected |
Definition at line 598 of file MCStreamer.cpp.
References llvm::MCWin64EHUnwindEmitter::Emit(), and getNumW64UnwindInfos().
|
pure virtual |
EmitWeakReference - Emit an weak reference from Alias
to Symbol
.
This corresponds to an assembler statement such as: .weakref alias, symbol
Alias | - The alias that is being created. |
Symbol | - The symbol being aliased. |
Implemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
|
virtual |
Definition at line 514 of file MCStreamer.cpp.
References llvm::MCContext::CreateTempSymbol(), EmitLabel(), getContext(), llvm::MCWin64EHUnwindInfo::Instructions, and llvm::report_fatal_error().
|
virtual |
Definition at line 459 of file MCStreamer.cpp.
References llvm::MCWin64EHUnwindInfo::ChainedParent, llvm::MCContext::CreateTempSymbol(), EmitLabel(), llvm::MCWin64EHUnwindInfo::End, getContext(), and llvm::report_fatal_error().
|
virtual |
Definition at line 439 of file MCStreamer.cpp.
References llvm::MCWin64EHUnwindInfo::ChainedParent, llvm::MCContext::CreateTempSymbol(), EmitLabel(), llvm::MCWin64EHUnwindInfo::End, getContext(), and llvm::report_fatal_error().
Referenced by llvm::Win64Exception::EndFunction().
|
virtual |
Definition at line 562 of file MCStreamer.cpp.
References llvm::MCContext::CreateTempSymbol(), EmitLabel(), getContext(), and llvm::MCWin64EHUnwindInfo::PrologEnd.
Definition at line 469 of file MCStreamer.cpp.
References llvm::MCWin64EHUnwindInfo::ChainedParent, llvm::MCWin64EHUnwindInfo::ExceptionHandler, llvm::MCWin64EHUnwindInfo::HandlesExceptions, llvm::MCWin64EHUnwindInfo::HandlesUnwind, and llvm::report_fatal_error().
Referenced by llvm::Win64Exception::BeginFunction().
|
virtual |
Definition at line 484 of file MCStreamer.cpp.
References llvm::MCWin64EHUnwindInfo::ChainedParent, and llvm::report_fatal_error().
Referenced by llvm::Win64Exception::EndFunction().
|
virtual |
Definition at line 551 of file MCStreamer.cpp.
References llvm::MCContext::CreateTempSymbol(), EmitLabel(), getContext(), llvm::MCWin64EHUnwindInfo::Instructions, llvm::report_fatal_error(), and llvm::Win64EH::UOP_PushMachFrame.
|
virtual |
Definition at line 491 of file MCStreamer.cpp.
References llvm::MCContext::CreateTempSymbol(), EmitLabel(), getContext(), llvm::MCWin64EHUnwindInfo::Instructions, and llvm::Win64EH::UOP_PushNonVol.
Definition at line 525 of file MCStreamer.cpp.
References llvm::MCContext::CreateTempSymbol(), EmitLabel(), getContext(), llvm::MCWin64EHUnwindInfo::Instructions, llvm::report_fatal_error(), llvm::Win64EH::UOP_SaveNonVol, and llvm::Win64EH::UOP_SaveNonVolBig.
Definition at line 538 of file MCStreamer.cpp.
References llvm::MCContext::CreateTempSymbol(), EmitLabel(), getContext(), llvm::MCWin64EHUnwindInfo::Instructions, llvm::report_fatal_error(), llvm::Win64EH::UOP_SaveXMM128, and llvm::Win64EH::UOP_SaveXMM128Big.
Definition at line 500 of file MCStreamer.cpp.
References llvm::MCContext::CreateTempSymbol(), EmitLabel(), getContext(), llvm::MCWin64EHUnwindInfo::Instructions, llvm::MCWin64EHUnwindInfo::LastFrameInst, llvm::report_fatal_error(), and llvm::Win64EH::UOP_SetFPReg.
|
virtual |
Definition at line 448 of file MCStreamer.cpp.
References llvm::MCWin64EHUnwindInfo::Begin, llvm::MCWin64EHUnwindInfo::ChainedParent, llvm::MCContext::CreateTempSymbol(), EmitLabel(), llvm::MCWin64EHUnwindInfo::Function, and getContext().
|
virtual |
Definition at line 428 of file MCStreamer.cpp.
References llvm::MCWin64EHUnwindInfo::Begin, llvm::MCContext::CreateTempSymbol(), EmitLabel(), llvm::MCWin64EHUnwindInfo::End, llvm::MCWin64EHUnwindInfo::Function, getContext(), llvm::report_fatal_error(), and llvm::ARMBuildAttrs::Symbol.
Referenced by llvm::Win64Exception::BeginFunction().
|
pure virtual |
EmitZerofill - Emit the zerofill section and an optional symbol.
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.
Referenced by llvm::AsmPrinter::EmitGlobalVariable().
|
virtual |
Emit NumBytes worth of zeros. This function properly handles data in virtual sections.
The implementation in this class just redirects to EmitFill.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 166 of file MCStreamer.cpp.
References EmitFill().
Referenced by llvm::AsmPrinter::EmitConstantPool(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), emitGlobalConstantStruct(), and emitGlobalConstantVector().
|
pure virtual |
EndCOFFSymbolDef - Marks the end of the symbol definition.
Implemented in llvm::MCELFStreamer.
Referenced by llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), and llvm::X86AsmPrinter::runOnMachineFunction().
void MCStreamer::Finish | ( | ) |
Finish - Finish emission of machine code.
Definition at line 605 of file MCStreamer.cpp.
References FinishImpl(), and llvm::report_fatal_error().
Referenced by llvm::AsmPrinter::doFinalization().
|
pure virtual |
FinishImpl - Streamer specific finalization.
Implemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Referenced by Finish().
|
inlinevirtual |
Flush - Causes any cached state to be written out.
Reimplemented in llvm::MCELFStreamer.
Definition at line 672 of file MCStreamer.h.
Referenced by llvm::AsmPrinter::doFinalization().
Definition at line 68 of file MCStreamer.cpp.
References llvm::MCSymbolRefExpr::Create(), llvm::MCContext::CreateTempSymbol(), EmitAssignment(), llvm::MCContext::getAsmInfo(), and llvm::MCAsmInfo::hasAggressiveSymbolFolding().
Referenced by EmitAbsValue(), llvm::MCObjectStreamer::EmitDwarfAdvanceFrameAddr(), llvm::MCObjectStreamer::EmitDwarfAdvanceLineAddr(), llvm::MCObjectStreamer::EmitSLEB128Value(), and llvm::MCObjectStreamer::EmitULEB128Value().
void MCStreamer::generateCompactUnwindEncodings | ( | MCAsmBackend * | MAB | ) |
Definition at line 83 of file MCStreamer.cpp.
References llvm::MCAsmBackend::generateCompactUnwindEncoding(), and I.
Referenced by llvm::MCDwarfFrameEmitter::Emit().
|
virtual |
GetCommentOS - 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 78 of file MCStreamer.cpp.
References llvm::nulls().
Referenced by emitBasicBlockLoopComments(), llvm::AsmPrinter::EmitFunctionBody(), llvm::AsmPrinter::EmitFunctionHeader(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), and llvm::AsmPrinter::EmitGlobalVariable().
|
inline |
Definition at line 168 of file MCStreamer.h.
Referenced by llvm::DwarfDebug::beginFunction(), llvm::MCWin64EHUnwindEmitter::Emit(), llvm::MCDwarfFileTable::Emit(), llvm::MCDwarfLineAddr::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), llvm::EmitAbsDifference(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCDwarfFileTable::EmitCU(), llvm::MCObjectStreamer::EmitDwarfAdvanceFrameAddr(), llvm::MCObjectStreamer::EmitDwarfAdvanceLineAddr(), EmitDwarfFileDirective(), EmitDwarfLineTable(), EmitDwarfLocDirective(), EmitFill(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitPersonality(), llvm::EmitRuntimeFunction(), EmitSymbol(), llvm::EmitSymbolRefWithOfs(), EmitSymbolValue(), llvm::MCWin64EHUnwindEmitter::EmitUnwindInfo(), llvm::EmitUnwindInfo(), llvm::MCObjectStreamer::EmitValueToOffset(), llvm::MCELFStreamer::EmitWeakReference(), EmitWin64EHAllocStack(), EmitWin64EHEndChained(), EmitWin64EHEndProc(), EmitWin64EHEndProlog(), EmitWin64EHPushFrame(), EmitWin64EHPushReg(), EmitWin64EHSaveReg(), EmitWin64EHSaveXMM(), EmitWin64EHSetFrame(), EmitWin64EHStartChained(), EmitWin64EHStartProc(), llvm::DwarfDebug::endFunction(), llvm::MCObjectStreamer::FinishImpl(), getDataAlignmentFactor(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(), getSizeForEncoding(), LowerTlsAddr(), llvm::MCLineEntry::Make(), llvm::MCGenDwarfLabelEntry::Make(), MakeStartMinusEndExpr(), RecordProcEnd(), RecordProcStart(), and llvm::StackMaps::serializeToStackMapSection().
|
inline |
getCurrentSection - Return the current section that the streamer is emitting code to.
Definition at line 224 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), and llvm::SmallVectorBase::empty().
Referenced by llvm::MCObjectStreamer::EmitBytes(), EmitDebugLabel(), llvm::MCObjectStreamer::EmitDwarfLocDirective(), llvm::MCObjectStreamer::EmitInstruction(), EmitLabel(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::MCObjectStreamer::EmitZeros(), llvm::AsmPrinter::getCurrentSection(), llvm::MCGenDwarfLabelEntry::Make(), and PushSection().
|
inlineprotected |
Definition at line 154 of file MCStreamer.h.
|
inline |
Definition at line 177 of file MCStreamer.h.
|
inline |
Definition at line 179 of file MCStreamer.h.
Referenced by llvm::MCDwarfFrameEmitter::Emit().
|
inline |
Definition at line 175 of file MCStreamer.h.
Referenced by EmitFrames().
|
inline |
Definition at line 181 of file MCStreamer.h.
Referenced by llvm::MCWin64EHUnwindEmitter::Emit(), EmitW64Tables(), reset(), and ~MCStreamer().
|
virtual |
getOrCreateSymbolData - Get symbol data for given symbol.
Reimplemented in llvm::MCELFStreamer.
Definition at line 612 of file MCStreamer.cpp.
References llvm::report_fatal_error().
|
inline |
getPreviousSection - Return the previous section that the streamer is emitting code to.
Definition at line 232 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), and llvm::SmallVectorBase::empty().
Referenced by PushSection().
GetSymbolOrder - Returns an index to represent the order a symbol was emitted in. (zero if we did not emit that symbol)
Definition at line 240 of file MCStreamer.h.
|
inline |
Definition at line 170 of file MCStreamer.h.
|
inline |
Definition at line 183 of file MCStreamer.h.
Referenced by llvm::MCWin64EHUnwindEmitter::Emit().
|
inlinevirtual |
hasRawTextSupport - Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText.
Definition at line 198 of file MCStreamer.h.
Referenced by llvm::AMDGPUAsmPrinter::AMDGPUAsmPrinter(), llvm::DwarfDebug::beginFunction(), llvm::AsmPrinter::EmitBasicBlockStart(), llvm::MipsAsmPrinter::emitFrameDirective(), llvm::MipsAsmPrinter::EmitFunctionBodyEnd(), llvm::MipsAsmPrinter::EmitFunctionBodyStart(), llvm::MipsAsmPrinter::EmitFunctionEntryLabel(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MipsReginfo::emitMipsReginfoSectionCG(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::DIEInteger::EmitValue(), llvm::DwarfDebug::getOrCreateSourceID(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
|
pure virtual |
InitSections - Create the default sections and set the initial one.
Implemented in llvm::MCELFStreamer.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitMC(), and InitStreamer().
|
inline |
Initialize the streamer.
Definition at line 307 of file MCStreamer.h.
References InitSections().
Referenced by llvm::AsmPrinter::doInitialization().
|
pure virtual |
InitToTextSection - Create a text section and switch the streamer to it.
Implemented in llvm::MCELFStreamer.
|
inlinevirtual |
isVerboseAsm - Return true if this streamer supports verbose assembly and if it is enabled.
Definition at line 194 of file MCStreamer.h.
Referenced by llvm::AsmPrinter::AsmPrinter(), EmitEncodingByte(), llvm::DwarfException::EmitExceptionTable(), EmitSymbol(), and llvm::DwarfException::EmitTypeInfos().
|
inline |
popSection - Restore the current and previous section from the section stack. Calls ChangeSection as needed.
Returns false if the stack was empty.
Definition at line 261 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), ChangeSection(), llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::MCELFStreamer::EmitIdent(), and llvm::Win64Exception::EndFunction().
|
inline |
pushSection - Save the current and previous section on the section stack.
Definition at line 252 of file MCStreamer.h.
References getCurrentSection(), getPreviousSection(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
Referenced by llvm::MCELFStreamer::EmitIdent(), and llvm::Win64Exception::EndFunction().
|
protected |
Definition at line 274 of file MCStreamer.cpp.
References llvm::MCContext::CreateTempSymbol(), EmitLabel(), llvm::MCDwarfFrameInfo::End, and getContext().
|
protected |
Definition at line 252 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::Begin, llvm::MCContext::CreateTempSymbol(), EmitLabel(), llvm::MCDwarfFrameInfo::Function, llvm::MCContext::getAsmInfo(), getContext(), llvm::MCSymbol::getName(), llvm::MCAsmInfo::getPrivateGlobalPrefix(), llvm::cl::Prefix, and llvm::StringRef::startswith().
|
virtual |
State management
Reimplemented in llvm::MCObjectStreamer.
Definition at line 43 of file MCStreamer.cpp.
References llvm::SmallVectorImpl< T >::clear(), getNumW64UnwindInfos(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::AsmPrinter::doFinalization(), and llvm::MCObjectStreamer::reset().
|
inline |
Tell this MCStreamer to call InitSections upon initialization.
Definition at line 313 of file MCStreamer.h.
Definition at line 272 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorBase::empty(), and SwitchSection().
|
inline |
SwitchSection - 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.
Definition at line 284 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), and ChangeSection().
Referenced by llvm::AsmPrinter::doFinalization(), llvm::MCWin64EHUnwindEmitter::Emit(), llvm::MCDwarfFileTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), llvm::DwarfUnits::emitAddresses(), llvm::AsmPrinter::EmitConstantPool(), EmitDwarfLineTable(), llvm::SystemZAsmPrinter::EmitEndOfAsmFile(), llvm::AArch64AsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::DwarfException::EmitExceptionTable(), llvm::AsmPrinter::EmitFunctionHeader(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::MCELFStreamer::EmitIdent(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::MipsReginfo::emitMipsReginfoSectionCG(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), emitSectionSym(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::ARMAsmPrinter::EmitStartOfAsmFile(), llvm::DwarfUnits::emitStrings(), llvm::DwarfUnits::emitUnits(), llvm::MCWin64EHUnwindEmitter::EmitUnwindInfo(), llvm::DwarfCFIException::EndModule(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::StackMaps::serializeToStackMapSection(), and SubSection().
|
inline |
SwitchSectionNoChange - 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 297 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back().