|
LLVM
3.7.0
|
#include <RecordStreamer.h>
Public Types | |
| enum | State { NeverSeen, Global, Defined, DefinedGlobal, Used } |
| typedef StringMap< State > ::const_iterator | const_iterator |
Public Member Functions | |
| const_iterator | begin () |
| const_iterator | end () |
| RecordStreamer (MCContext &Context) | |
| void | EmitInstruction (const MCInst &Inst, const MCSubtargetInfo &STI) override |
Emit the given Instruction into the current section. More... | |
| void | EmitLabel (MCSymbol *Symbol) override |
Emit a label for Symbol into the current section. More... | |
| void | EmitAssignment (MCSymbol *Symbol, const MCExpr *Value) override |
Emit an assignment of Value to Symbol. More... | |
| bool | EmitSymbolAttribute (MCSymbol *Symbol, MCSymbolAttr Attribute) override |
Add the given Attribute to Symbol. More... | |
| void | EmitZerofill (MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override |
| Emit the zerofill section and an optional symbol. More... | |
| void | EmitCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override |
| Emit a common symbol. More... | |
Public Member Functions inherited from llvm::MCStreamer | |
| virtual | ~MCStreamer () |
| void | visitUsedExpr (const MCExpr &Expr) |
| 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 | 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 |
| 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... | |
| 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 | 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 | EmitWeakReference (MCSymbol *Alias, const MCSymbol *Symbol) |
Emit an weak reference from Alias 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 | EmitLocalCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) |
| Emit a local common (.lcomm) symbol. More... | |
| virtual void | EmitTBSSSymbol (MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment=0) |
| Emit a thread local bss (.tbss) symbol. More... | |
| 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... | |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::MCStreamer | |
| 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... | |
Definition at line 16 of file RecordStreamer.h.
Definition at line 28 of file RecordStreamer.h.
| Enumerator | |
|---|---|
| NeverSeen | |
| Global | |
| Defined | |
| DefinedGlobal | |
| Used | |
Definition at line 18 of file RecordStreamer.h.
| RecordStreamer::RecordStreamer | ( | MCContext & | Context | ) |
Definition at line 68 of file RecordStreamer.cpp.
| RecordStreamer::const_iterator RecordStreamer::begin | ( | ) |
Definition at line 62 of file RecordStreamer.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::begin().
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 from llvm::MCStreamer.
Definition at line 80 of file RecordStreamer.cpp.
References llvm::MCStreamer::EmitAssignment().
|
overridevirtual |
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. |
Implements llvm::MCStreamer.
Definition at line 97 of file RecordStreamer.cpp.
|
overridevirtual |
Emit the given Instruction into the current section.
Reimplemented from llvm::MCStreamer.
Definition at line 70 of file RecordStreamer.cpp.
References llvm::MCStreamer::EmitInstruction().
|
overridevirtual |
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 from llvm::MCStreamer.
Definition at line 75 of file RecordStreamer.cpp.
References llvm::MCStreamer::EmitLabel().
|
overridevirtual |
Add the given Attribute to Symbol.
Implements llvm::MCStreamer.
Definition at line 85 of file RecordStreamer.cpp.
References llvm::MCSA_Global.
|
overridevirtual |
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. |
Implements llvm::MCStreamer.
Definition at line 92 of file RecordStreamer.cpp.
| RecordStreamer::const_iterator RecordStreamer::end | ( | ) |
Definition at line 66 of file RecordStreamer.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::end().
1.8.6