|
LLVM
3.7.0
|
Streaming machine code generation interface. More...
#include <MCStreamer.h>
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... | |
| MCContext & | getContext () const |
| MCTargetStreamer * | getTargetStreamer () |
| unsigned | getNumFrameInfos () |
| ArrayRef< MCDwarfFrameInfo > | getDwarfFrameInfos () 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 MCSymbol * | getDwarfLineTableSymbol (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_ostream & | GetCommentOS () |
| 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... | |
| MCSection * | getCurrentSectionOnly () 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... | |
| MCSymbol * | endSection (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::FrameInfo * | getCurrentWinFrameInfo () |
| 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... | |
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.
|
protected |
Definition at line 43 of file MCStreamer.cpp.
References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
|
virtual |
Definition at line 48 of file MCStreamer.cpp.
References getNumWinFrameInfos().
|
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().
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().
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 192 of file MCStreamer.cpp.
References llvm::MCSymbol::setSection(), llvm::MCSymbol::setUndefined(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), and llvm::ARMBuildAttrs::Symbol.
Referenced by llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), EmitLabel(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), and llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol().
Start emitting COFF symbol definition.
| 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.
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().
|
virtual |
Emit the absolute difference between two symbols.
Hi is greater than the offset Lo. Reimplemented in llvm::MCObjectStreamer.
Definition at line 647 of file MCStreamer.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), llvm::MCContext::createTempSymbol(), llvm::MCAsmInfo::doesSetDirectiveSuppressesReloc(), EmitAssignment(), EmitSymbolValue(), EmitValue(), and llvm::MCContext::getAsmInfo().
Referenced by llvm::MCObjectStreamer::emitAbsoluteSymbolDiff().
|
virtual |
Note in the output the specified Flag.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 666 of file MCStreamer.cpp.
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. |
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().
|
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.
|
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. |
Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Definition at line 697 of file MCStreamer.cpp.
|
virtual |
Ends a bundle-locked group.
Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Definition at line 699 of file MCStreamer.cpp.
|
virtual |
Emit the bytes in Data into the output.
This is used to implement assembler directives such as .byte, .ascii, etc.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 681 of file MCStreamer.cpp.
Referenced by llvm::MCDwarfLineTableHeader::Emit(), llvm::MCDwarfLineAddr::Emit(), llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), EmitGenDwarfInfo(), EmitIntValue(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), EmitNops(), EmitSLEB128IntValue(), and EmitULEB128IntValue().
|
virtual |
Definition at line 278 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createAdjustCfaOffset(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 261 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfa(), llvm::MCDwarfFrameInfo::CurrentCfaRegister, llvm::MCDwarfFrameInfo::Instructions, and Register.
|
virtual |
Definition at line 270 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfaOffset(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 286 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createDefCfaRegister(), llvm::MCDwarfFrameInfo::CurrentCfaRegister, llvm::MCDwarfFrameInfo::Instructions, and Register.
| void MCStreamer::EmitCFIEndProc | ( | ) |
Definition at line 242 of file MCStreamer.cpp.
References EmitCFIEndProcImpl().
|
protectedvirtual |
Definition at line 248 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::End.
Referenced by EmitCFIEndProc().
|
virtual |
Definition at line 357 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createEscape(), and llvm::MCDwarfFrameInfo::Instructions.
Definition at line 319 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::Lsda, and llvm::MCDwarfFrameInfo::LsdaEncoding.
|
virtual |
Definition at line 295 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createOffset(), and llvm::MCDwarfFrameInfo::Instructions.
Definition at line 311 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::Personality, and llvm::MCDwarfFrameInfo::PersonalityEncoding.
|
virtual |
Definition at line 378 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRegister(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 303 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRelOffset(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 326 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRememberState(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 349 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRestore(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 333 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createRestoreState(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 341 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createSameValue(), and llvm::MCDwarfFrameInfo::Instructions.
Reimplemented in llvm::MCObjectStreamer.
Definition at line 213 of file MCStreamer.cpp.
Referenced by llvm::MCObjectStreamer::EmitCFISections().
|
virtual |
Definition at line 364 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::IsSignalFrame.
| void MCStreamer::EmitCFIStartProc | ( | bool | IsSimple | ) |
Definition at line 217 of file MCStreamer.cpp.
References llvm::MCDwarfFrameInfo::CurrentCfaRegister, EmitCFIStartProcImpl(), llvm::MCDwarfFrameInfo::End, llvm::MCContext::getAsmInfo(), llvm::MCAsmInfo::getInitialFrameState(), llvm::MCDwarfFrameInfo::IsSimple, llvm::MCCFIInstruction::OpDefCfa, llvm::MCCFIInstruction::OpDefCfaRegister, and llvm::report_fatal_error().
|
protectedvirtual |
Definition at line 239 of file MCStreamer.cpp.
Referenced by EmitCFIStartProc().
|
virtual |
Definition at line 370 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createUndefined(), and llvm::MCDwarfFrameInfo::Instructions.
|
virtual |
Definition at line 386 of file MCStreamer.cpp.
References llvm::MCCFIInstruction::createWindowSave(), and llvm::MCDwarfFrameInfo::Instructions.
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. |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 691 of file MCStreamer.cpp.
Referenced by llvm::ConstantPool::emitEntries().
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 559 of file MCStreamer.cpp.
Emits a COFF section relative relocation.
| Symbol | - Symbol the section relative relocation should point to. |
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 565 of file MCStreamer.cpp.
Referenced by EmitSymbolValue().
Emits a COFF section index.
| Symbol | - Symbol the section number relocation should point to. |
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 562 of file MCStreamer.cpp.
|
virtual |
Emit the storage class of the symbol.
| StorageClass | - The storage class the symbol should have. |
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 672 of file MCStreamer.cpp.
|
virtual |
Emit the type of the symbol.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 673 of file MCStreamer.cpp.
|
pure virtual |
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::MCWinCOFFStreamer, llvm::MCELFStreamer, and llvm::RecordStreamer.
|
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().
|
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().
|
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().
Definition at line 184 of file MCStreamer.cpp.
|
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().
|
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.
|
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().
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().
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().
|
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.
|
virtual |
Emit the given Instruction into the current section.
Reimplemented in llvm::MCObjectStreamer, llvm::MipsELFStreamer, llvm::RecordStreamer, and llvm::HexagonMCELFStreamer.
Definition at line 639 of file MCStreamer.cpp.
References llvm::MCOperand::getExpr(), llvm::MCInst::getNumOperands(), llvm::MCInst::getOperand(), llvm::MCOperand::isExpr(), and visitUsedExpr().
Referenced by EmitBinary(), EmitCall(), llvm::RecordStreamer::EmitInstruction(), llvm::X86AsmInstrumentation::EmitInstruction(), llvm::MCObjectStreamer::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), EmitNops(), EmitSETHI(), and llvm::AsmPrinter::EmitToStreamer().
|
virtual |
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
EmitIntValue - Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
Definition at line 79 of file MCStreamer.cpp.
References EmitBytes(), llvm::MCContext::getAsmInfo(), llvm::isIntN(), llvm::MCAsmInfo::isLittleEndian(), and llvm::isUIntN().
Referenced by llvm::MCDwarfLineTableHeader::Emit(), llvm::MCObjectStreamer::emitAbsoluteSymbolDiff(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), EmitDwarfLineTable(), emitDwarfSetLineAddr(), emitEncodingByte(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCELFStreamer::EmitIdent(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), emitNonLazySymbolPointer(), llvm::EmitUnwindCode(), llvm::EmitUnwindInfo(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::operator<<(), and llvm::FaultMaps::serializeToFaultMapSection().
|
virtual |
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, 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().
|
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().
|
virtual |
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. |
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 675 of file MCStreamer.cpp.
|
inlinevirtual |
Emit a Linker Optimization Hint (LOH) directive.
| Args | - Arguments of the LOH. |
Definition at line 465 of file MCStreamer.h.
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().
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().
|
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().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 687 of file MCStreamer.cpp.
|
pure virtual |
Add the given Attribute to Symbol.
Implemented in llvm::MCELFStreamer, llvm::MCWinCOFFStreamer, and llvm::RecordStreamer.
Referenced by emitNonLazySymbolPointer(), and llvm::TargetLoweringObjectFileELF::emitPersonalityValue().
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. |
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().
|
virtual |
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. |
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 677 of file MCStreamer.cpp.
|
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().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 686 of file MCStreamer.cpp.
Definition at line 110 of file MCStreamer.cpp.
References EmitValueImpl().
Referenced by llvm::EmitAbsDifference(), emitAbsoluteSymbolDiff(), emitAbsValue(), llvm::ConstantPool::emitEntries(), emitFDESymbol(), EmitFill(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::EmitLabelDiff(), emitNonLazySymbolPointer(), EmitPersonality(), llvm::EmitRuntimeFunction(), llvm::EmitSymbolRefWithOfs(), and llvm::EmitUnwindInfo().
|
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.
| 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().
|
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.
| 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().
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. |
Reimplemented in llvm::MCObjectStreamer.
Definition at line 693 of file MCStreamer.cpp.
Referenced by llvm::MCParserUtils::parseAssignmentExpression().
|
inlinevirtual |
Specify the MachO minimum deployment target version.
Definition at line 388 of file MCStreamer.h.
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. |
Reimplemented in llvm::MCObjectStreamer, and llvm::MCELFStreamer.
Definition at line 680 of file MCStreamer.cpp.
|
virtual |
Definition at line 498 of file MCStreamer.cpp.
References llvm::Win64EH::Instruction::Alloc(), llvm::MCContext::createTempSymbol(), EmitLabel(), getContext(), llvm::WinEH::FrameInfo::Instructions, and llvm::report_fatal_error().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
|
virtual |
Definition at line 437 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, llvm::MCContext::createTempSymbol(), EmitLabel(), llvm::WinEH::FrameInfo::End, getContext(), llvm::Label, and llvm::report_fatal_error().
|
virtual |
Definition at line 416 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, llvm::MCContext::createTempSymbol(), EmitLabel(), llvm::WinEH::FrameInfo::End, getContext(), llvm::Label, and llvm::report_fatal_error().
|
virtual |
Definition at line 550 of file MCStreamer.cpp.
References llvm::MCContext::createTempSymbol(), EmitLabel(), getContext(), llvm::Label, and llvm::WinEH::FrameInfo::PrologEnd.
Referenced by llvm::X86AsmPrinter::EmitInstruction().
|
virtual |
Definition at line 538 of file MCStreamer.cpp.
References llvm::MCContext::createTempSymbol(), EmitLabel(), getContext(), llvm::WinEH::FrameInfo::Instructions, llvm::Win64EH::Instruction::PushMachFrame(), and llvm::report_fatal_error().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
|
virtual |
Definition at line 470 of file MCStreamer.cpp.
References llvm::MCContext::createTempSymbol(), EmitLabel(), getContext(), llvm::WinEH::FrameInfo::Instructions, and llvm::Win64EH::Instruction::PushNonVol().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
Definition at line 512 of file MCStreamer.cpp.
References llvm::MCContext::createTempSymbol(), EmitLabel(), getContext(), llvm::WinEH::FrameInfo::Instructions, llvm::report_fatal_error(), and llvm::Win64EH::Instruction::SaveNonVol().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
Definition at line 525 of file MCStreamer.cpp.
References llvm::MCContext::createTempSymbol(), EmitLabel(), getContext(), llvm::WinEH::FrameInfo::Instructions, llvm::report_fatal_error(), and llvm::Win64EH::Instruction::SaveXMM().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
Definition at line 480 of file MCStreamer.cpp.
References llvm::MCContext::createTempSymbol(), EmitLabel(), getContext(), llvm::WinEH::FrameInfo::Instructions, llvm::WinEH::FrameInfo::LastFrameInst, llvm::report_fatal_error(), and llvm::Win64EH::Instruction::SetFPReg().
Referenced by llvm::X86AsmPrinter::EmitInstruction().
|
virtual |
Definition at line 426 of file MCStreamer.cpp.
References llvm::MCContext::createTempSymbol(), EmitLabel(), llvm::WinEH::FrameInfo::Function, and getContext().
Definition at line 402 of file MCStreamer.cpp.
References llvm::MCContext::createTempSymbol(), EmitLabel(), llvm::WinEH::FrameInfo::End, llvm::MCContext::getAsmInfo(), getContext(), llvm::report_fatal_error(), and llvm::MCAsmInfo::usesWindowsCFI().
|
protectedvirtual |
Definition at line 582 of file MCStreamer.cpp.
Definition at line 450 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, llvm::WinEH::FrameInfo::ExceptionHandler, llvm::WinEH::FrameInfo::HandlesExceptions, llvm::WinEH::FrameInfo::HandlesUnwind, and llvm::report_fatal_error().
|
virtual |
Reimplemented in llvm::MCWinCOFFStreamer.
Definition at line 464 of file MCStreamer.cpp.
References llvm::WinEH::FrameInfo::ChainedParent, and llvm::report_fatal_error().
|
pure virtual |
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, llvm::MCWinCOFFStreamer, and llvm::RecordStreamer.
|
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().
|
virtual |
Marks the end of the symbol definition.
Reimplemented in llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 670 of file MCStreamer.cpp.
Definition at line 715 of file MCStreamer.cpp.
References EmitLabel(), llvm::MCSection::getEndSymbol(), llvm::MCSymbol::isInSection(), and SwitchSection().
Referenced by EmitDwarfLineTable().
| 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.
|
virtual |
Streamer specific finalization.
Reimplemented in llvm::MCObjectStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 698 of file MCStreamer.cpp.
Referenced by Finish().
|
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 | ) |
Definition at line 71 of file MCStreamer.cpp.
References llvm::MCAsmBackend::generateCompactUnwindEncoding().
Referenced by llvm::MCDwarfFrameEmitter::Emit().
|
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().
|
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().
|
inline |
Return the current section that the streamer is emitting code to.
Definition at line 274 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), and llvm::SmallVectorBase::empty().
Referenced by llvm::AssemblerConstantPools::addEntry(), llvm::MCObjectStreamer::EmitBytes(), llvm::MCObjectStreamer::EmitDwarfLocDirective(), llvm::AssemblerConstantPools::emitForCurrentSection(), llvm::MCObjectStreamer::EmitInstruction(), EmitLabel(), llvm::MCObjectStreamer::EmitValueImpl(), llvm::MCObjectStreamer::EmitValueToAlignment(), llvm::MCObjectStreamer::EmitZeros(), getCurrentSectionOnly(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MCGenDwarfLabelEntry::Make(), and PushSection().
|
inline |
Definition at line 279 of file MCStreamer.h.
References getCurrentSection().
Referenced by llvm::MCELFStreamer::ChangeSection(), llvm::MCELFStreamer::EmitBundleLock(), llvm::MCELFStreamer::EmitBundleUnlock(), llvm::MCObjectStreamer::EmitInstruction(), llvm::MCELFStreamer::EmitSymbolAttribute(), llvm::MCELFStreamer::FinishImpl(), llvm::MCObjectStreamer::flushPendingLabels(), llvm::MCObjectStreamer::getCurrentFragment(), and llvm::MCObjectStreamer::insert().
|
inlineprotected |
Definition at line 188 of file MCStreamer.h.
|
inline |
Definition at line 217 of file MCStreamer.h.
Referenced by llvm::MCDwarfFrameEmitter::Emit(), and llvm::X86AsmInstrumentation::GetFrameRegGeneric().
Definition at line 162 of file MCStreamer.cpp.
References llvm::MCContext::getAsmInfo(), getContext(), llvm::MCDwarfLineTable::getLabel(), llvm::MCContext::getMCDwarfLineTable(), llvm::MCContext::getOrCreateSymbol(), llvm::MCAsmInfo::getPrivateGlobalPrefix(), llvm::cl::Prefix, and llvm::MCDwarfLineTable::setLabel().
Referenced by llvm::MCGenDwarfInfo::Emit().
|
inline |
Definition at line 216 of file MCStreamer.h.
Referenced by llvm::MCObjectStreamer::EmitFrames(), and llvm::X86AsmInstrumentation::GetFrameRegGeneric().
|
inline |
Definition at line 221 of file MCStreamer.h.
Referenced by reset(), and ~MCStreamer().
|
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().
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().
|
inline |
Definition at line 212 of file MCStreamer.h.
Referenced by llvm::MipsELFStreamer::createPendingLabelRelocs(), EmitAssignment(), EmitLabel(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), and Finish().
|
inline |
Definition at line 222 of file MCStreamer.h.
Referenced by llvm::Win64EH::UnwindEmitter::Emit().
|
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.
|
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().
|
inlinevirtual |
Is the integrated assembler required for this streamer to function correctly?
Reimplemented in llvm::MCObjectStreamer.
Definition at line 241 of file MCStreamer.h.
|
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().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 715 of file MCStreamer.h.
Referenced by llvm::MCContext::finalizeDwarfSections().
|
inline |
Restore the current and previous section from the section stack.
Calls ChangeSection as needed.
Returns false if the stack was empty.
Definition at line 310 of file MCStreamer.h.
References ChangeSection(), llvm::SmallVectorTemplateCommon< T, typename >::end(), I, llvm::SmallVectorTemplateBase< T, isPodLike >::pop_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), llvm::MCELFStreamer::EmitIdent(), and llvm::MipsRegInfoRecord::EmitMipsOptionRecord().
|
inline |
Save the current and previous section on the section stack.
Definition at line 301 of file MCStreamer.h.
References getCurrentSection(), getPreviousSection(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
Referenced by llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), llvm::MCELFStreamer::EmitIdent(), and llvm::MipsRegInfoRecord::EmitMipsOptionRecord().
|
virtual |
State management.
Reimplemented in llvm::MCObjectStreamer, llvm::MCELFStreamer, and llvm::MCWinCOFFStreamer.
Definition at line 53 of file MCStreamer.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::SmallVectorImpl< T >::clear(), getNumWinFrameInfos(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::MCObjectStreamer::reset().
|
inline |
Definition at line 202 of file MCStreamer.h.
Referenced by llvm::MCTargetStreamer::MCTargetStreamer().
Definition at line 325 of file MCStreamer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorBase::empty(), and 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.
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().
|
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().
Definition at line 613 of file MCStreamer.cpp.
References llvm::MCExpr::Binary, llvm::MCExpr::Constant, llvm::MCExpr::getKind(), llvm::MCBinaryExpr::getLHS(), llvm::MCBinaryExpr::getRHS(), llvm::MCExpr::SymbolRef, llvm::MCExpr::Target, llvm::MCExpr::Unary, and visitUsedSymbol().
Referenced by EmitAssignment(), EmitInstruction(), llvm::HexagonMCELFStreamer::EmitSymbol(), EmitValueImpl(), llvm::MipsMCExpr::visitUsedExpr(), llvm::ARMMCExpr::visitUsedExpr(), llvm::PPCMCExpr::visitUsedExpr(), llvm::SparcMCExpr::visitUsedExpr(), and llvm::AArch64MCExpr::visitUsedExpr().
Reimplemented in llvm::MCObjectStreamer.
Definition at line 610 of file MCStreamer.cpp.
Referenced by visitUsedExpr().
1.8.6