47 :
Context(Ctx), CurrentWinFrameInfo(nullptr) {
48 SectionStack.
push_back(std::pair<MCSectionSubPair, MCSectionSubPair>());
53 delete WinFrameInfos[
i];
57 DwarfFrameInfos.clear();
59 delete WinFrameInfos[
i];
60 WinFrameInfos.clear();
61 CurrentWinFrameInfo =
nullptr;
62 SymbolOrdering.
clear();
64 SectionStack.
push_back(std::pair<MCSectionSubPair, MCSectionSubPair>());
78 for (
auto &FI : DwarfFrameInfos)
79 FI.CompactUnwindEncoding =
86 assert(1 <= Size && Size <= 8 &&
"Invalid size");
91 for (
unsigned i = 0;
i != Size; ++
i) {
92 unsigned index = isLittleEndian ?
i : (Size -
i - 1);
93 buf[
i] = uint8_t(Value >> (index * 8));
121 bool IsSectionRelative) {
122 assert((!IsSectionRelative || Size == 4) &&
123 "SectionRelative value requires 4-bytes");
125 if (!IsSectionRelative)
158 for (uint64_t
i = 0, e = NumBytes;
i != e; ++
i)
163 int64_t NonZeroSize = Size > 4 ? 4 : Size;
164 Expr &= ~0ULL >> (64 - NonZeroSize * 8);
165 for (uint64_t
i = 0, e = NumValues;
i != e; ++
i) {
167 if (NonZeroSize < Size)
184 unsigned Column,
unsigned Flags,
186 unsigned Discriminator,
197 Context.getOrCreateSymbol(Prefix +
"line_table_start" +
Twine(CUID)));
203 if (DwarfFrameInfos.empty())
205 return &DwarfFrameInfos.back();
210 return CurFrame && !CurFrame->
End;
213 void MCStreamer::EnsureValidDwarfFrame() {
215 if (!CurFrame || CurFrame->
End)
228 unsigned IAFunc,
unsigned IAFile,
229 unsigned IALine,
unsigned IACol,
231 if (
getContext().getCVContext().getCVFunctionInfo(IAFunc) ==
nullptr) {
233 ".cv_func_id or .cv_inline_site_id");
238 FunctionId, IAFunc, IAFile, IALine, IACol);
242 unsigned Line,
unsigned Column,
243 bool PrologueEnd,
bool IsStmt,
249 Loc,
"function id not introduced by .cv_func_id or .cv_inline_site_id");
257 "all .cv_loc directives for a function must be in the same section");
259 CVC.
setCurrentCVLoc(FunctionId, FileNo, Line, Column, PrologueEnd, IsStmt);
267 unsigned SourceFileId,
268 unsigned SourceLineNum,
273 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
290 SymbolOrdering[
Symbol] = 1 + SymbolOrdering.
size();
326 DwarfFrameInfos.push_back(Frame);
333 EnsureValidDwarfFrame();
344 MCSymbol *MCStreamer::EmitCFILabel() {
350 MCSymbol *MCStreamer::EmitCFICommon() {
351 EnsureValidDwarfFrame();
352 return EmitCFILabel();
407 EnsureValidDwarfFrame();
414 EnsureValidDwarfFrame();
416 CurFrame->
Lsda = Sym;
467 EnsureValidDwarfFrame();
496 void MCStreamer::EnsureValidWinFrameInfo() {
500 if (!CurrentWinFrameInfo || CurrentWinFrameInfo->
End)
508 if (CurrentWinFrameInfo && !CurrentWinFrameInfo->
End)
511 MCSymbol *StartProc = EmitCFILabel();
514 CurrentWinFrameInfo = WinFrameInfos.back();
519 EnsureValidWinFrameInfo();
524 CurrentWinFrameInfo->
End = Label;
528 EnsureValidWinFrameInfo();
530 MCSymbol *StartProc = EmitCFILabel();
533 StartProc, CurrentWinFrameInfo));
534 CurrentWinFrameInfo = WinFrameInfos.back();
539 EnsureValidWinFrameInfo();
545 CurrentWinFrameInfo->
End = Label;
546 CurrentWinFrameInfo =
552 EnsureValidWinFrameInfo();
556 if (!Except && !Unwind)
565 EnsureValidWinFrameInfo();
577 const auto *TextSecCOFF = cast<MCSectionCOFF>(TextSec);
578 unsigned UniqueID = TextSecCOFF->getOrAssignWinCFISectionID(NextWinCFIID);
584 KeySym = TextSecCOFF->getCOMDATSymbol();
592 getContext().getObjectFileInfo()->getPDataSection(),
598 getContext().getObjectFileInfo()->getXDataSection(),
605 EnsureValidWinFrameInfo();
614 EnsureValidWinFrameInfo();
631 EnsureValidWinFrameInfo();
644 EnsureValidWinFrameInfo();
656 EnsureValidWinFrameInfo();
668 EnsureValidWinFrameInfo();
679 EnsureValidWinFrameInfo();
698 errs() <<
"EmitRawText called on an MCStreamer that doesn't support it, "
699 " something must not be fully mc'ized\n";
712 if (!DwarfFrameInfos.empty() && !DwarfFrameInfos.back().End)
733 InstPrinter.
printInst(&Inst, OS,
"", STI);
819 unsigned MaxBytesToEmit) {}
821 unsigned MaxBytesToEmit) {}
830 assert(Section &&
"Cannot switch to a null section!");
832 SectionStack.
back().second = curSection;
838 if (Sym && !Sym->isInSection())
virtual void EmitBundleUnlock()
Ends a bundle-locked group.
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag)
Note in the output the specified Flag.
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.
virtual void EmitBundleAlignMode(unsigned AlignPow2)
Set the bundle alignment mode from now on in the section.
Instances of this class represent a uniqued identifier for a section in the current translation unit...
void push_back(const T &Elt)
virtual void EmitCFISameValue(int64_t Register)
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
virtual void EmitCFIPersonality(const MCSymbol *Sym, unsigned Encoding)
virtual void EmitSLEB128Value(const MCExpr *Value)
virtual void EmitCFIGnuArgsSize(int64_t Size)
void EmitRawText(const Twine &String)
If this file is backed by a assembly streamer, this dumps the specified string in the output ...
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
virtual void EmitWinCFIEndProlog()
void EmitSLEB128IntValue(int64_t Value)
Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integ...
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
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.
virtual void emitValueToOffset(const MCExpr *Offset, unsigned char Value, SMLoc Loc)
Emit some number of copies of Value until the byte offset Offset is reached.
virtual void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot, const MCSubtargetInfo &STI)=0
Print the specified MCInst to the specified raw_ostream.
virtual void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment=0)
Emit a thread local bss (.tbss) symbol.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
virtual void EndCOFFSymbolDef()
Marks the end of the symbol definition.
virtual ~MCTargetStreamer()
MCSection * Section
The section of the first .cv_loc directive used for this function, or null if none has been seen yet...
virtual void EmitULEB128Value(const MCExpr *Value)
static MCCFIInstruction createRememberState(MCSymbol *L)
.cfi_remember_state Save all current rules for all registers.
virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol)
Emit an weak reference from Alias to Symbol.
static WinEH::Instruction SaveNonVol(MCSymbol *L, unsigned Reg, unsigned Offset)
virtual void EmitBytes(StringRef Data)
Emit the bytes in Data into the output.
static MCCFIInstruction createOffset(MCSymbol *L, unsigned Register, int Offset)
.cfi_offset Previous value of Register is saved at offset Offset from CFA.
MCSymbol * getLabel() const
Target specific streamer interface.
virtual void reset()
State management.
unsigned CurrentCfaRegister
virtual void EmitWindowsUnwindTables()
void EmitCFIStartProc(bool IsSimple)
virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol)
Start emitting COFF symbol definition.
virtual void EmitDTPRel64Value(const MCExpr *Value)
Emit the expression Value into the output as a dtprel (64-bit DTP relative) value.
virtual unsigned EmitDwarfFileDirective(unsigned FileNo, StringRef Directory, StringRef Filename, unsigned CUID=0)
Associate a filename with a specified logical file number.
A raw_ostream that writes to an SmallVector or SmallString.
virtual void EmitCFIRegister(int64_t Register1, int64_t Register2)
virtual void emitExplicitComments()
Emit added explicit comments.
virtual void EmitCFIDefCfaOffset(int64_t Offset)
virtual MCSymbol * getDwarfLineTableSymbol(unsigned CUID)
static MCCFIInstruction createDefCfaOffset(MCSymbol *L, int Offset)
.cfi_def_cfa_offset modifies a rule for computing CFA.
COFF::SymbolStorageClass StorageClass
virtual void EmitCOFFSymbolStorageClass(int StorageClass)
Emit the storage class of the symbol.
std::vector< Instruction > Instructions
virtual void EmitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
Emit the expression Value into the output as a native integer of the given Size bytes.
static MCCFIInstruction createAdjustCfaOffset(MCSymbol *L, int Adjustment)
.cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but Offset is a relative value that is added/subt...
virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI)
Emit the given Instruction into the current section.
virtual void addExplicitComment(const Twine &T)
Add explicit comment T.
virtual void EmitCFISections(bool EH, bool Debug)
virtual void EmitGPRel32Value(const MCExpr *Value)
Emit the expression Value into the output as a gprel32 (32-bit GP relative) value.
MCSectionCOFF * getAssociativeCOFFSection(MCSectionCOFF *Sec, const MCSymbol *KeySym, unsigned UniqueID=GenericSectionID)
Gets or creates a section equivalent to Sec that is associated with the section containing KeySym...
std::vector< MCCFIInstruction > Instructions
static MCCFIInstruction createUndefined(MCSymbol *L, unsigned Register)
.cfi_undefined From now on the previous value of Register can't be restored anymore.
virtual void EmitWinEHHandlerData()
virtual void EmitCFIRememberState()
virtual void EmitCFILsda(const MCSymbol *Sym, unsigned Encoding)
virtual void EmitGPRel64Value(const MCExpr *Value)
Emit the expression Value into the output as a gprel64 (64-bit GP relative) value.
void AssignFragment(MCSymbol *Symbol, MCFragment *Fragment)
Sets the symbol's section.
struct fuzzer::@269 Flags
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
virtual void EmitCFIEscape(StringRef Values)
virtual void EmitCOFFSymbolType(int Type)
Emit the type of the symbol.
MCSection * getCurrentSectionOnly() const
Base class for the full range of assembler expressions which are needed for parsing.
const std::vector< MCCFIInstruction > & getInitialFrameState() const
virtual void emitLabel(MCSymbol *Symbol)
virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame)
unsigned getNumWinFrameInfos()
MCDwarfLineTable & getMCDwarfLineTable(unsigned CUID)
MCContext & getContext() const
MCSymbol * getEndSymbol(MCContext &Ctx)
virtual void EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName, SMLoc Loc)
This implements the CodeView '.cv_loc' assembler directive.
virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value)
Emit an assignment of Value to Symbol.
Context object for machine code objects.
void setCurrentCVLoc(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt)
Saves the information from the currently parsed .cv_loc directive and sets CVLocSeen.
static WinEH::Instruction PushNonVol(MCSymbol *L, unsigned Reg)
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame)
std::pair< MCSection *, const MCExpr * > MCSectionSubPair
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
virtual void EmitTPRel64Value(const MCExpr *Value)
Emit the expression Value into the output as a tprel (64-bit TP relative) value.
virtual void emitRawComment(const Twine &T, bool TabPrefix=true)
Print T and prefix it with the comment string (normally #) and optionally a tab.
virtual void EmitBinaryData(StringRef Data)
Functionally identical to EmitBytes.
virtual void EmitCFIRestoreState()
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...
Expected< const typename ELFT::Sym * > getSymbol(typename ELFT::SymRange Symbols, uint32_t Index)
void EmitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
Instances of this class represent a single low-level machine instruction.
virtual void EmitCFIRestore(int64_t Register)
Flag
These should be considered private to the implementation of the MCInstrDesc class.
This class is intended to be used as a base class for asm properties and features specific to the tar...
void setFragment(MCFragment *F) const
Mark the symbol as defined in the fragment F.
virtual void EmitBundleLock(bool AlignToEnd)
The following instructions are a bundle-locked group.
virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)
Emit a local common (.lcomm) symbol.
const MCExpr * getExpr() const
static MCCFIInstruction createSameValue(MCSymbol *L, unsigned Register)
.cfi_same_value Current value of Register is the same as in the previous frame.
virtual raw_ostream & GetCommentOS()
Return a raw_ostream that comments can be written to.
const MCExpr * getLHS() const
Get the left-hand side expression of the binary operator.
bool addFile(unsigned FileNumber, StringRef Filename)
void EmitZeros(uint64_t NumBytes)
Emit NumBytes worth of zeros.
Streaming machine code generation interface.
MCSymbol * createTempSymbol(bool CanBeUnnamed=true)
Create and return a new assembler temporary symbol with a unique but unspecified name.
const FrameInfo * ChainedParent
MCTargetStreamer * getTargetStreamer()
static MCCFIInstruction createDefCfa(MCSymbol *L, unsigned Register, int Offset)
.cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it...
The instances of the Type class are immutable: once they are created, they are never changed...
virtual void EmitCVLinetableDirective(unsigned FunctionId, const MCSymbol *FnStart, const MCSymbol *FnEnd)
This implements the CodeView '.cv_linetable' assembler directive.
MCCVFunctionInfo * getCVFunctionInfo(unsigned FuncId)
Retreive the function info if this is a valid function id, or nullptr.
static MCCFIInstruction createDefCfaRegister(MCSymbol *L, unsigned Register)
.cfi_def_cfa_register modifies a rule for computing CFA.
virtual void EmitWinCFIPushReg(unsigned Register)
static MCCFIInstruction createWindowSave(MCSymbol *L)
.cfi_window_save SPARC register window is saved.
virtual void SwitchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
static MCCFIInstruction createGnuArgsSize(MCSymbol *L, int Size)
A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE.
static WinEH::Instruction PushMachFrame(MCSymbol *L, bool Code)
MCSection * getAssociatedPDataSection(const MCSection *TextSec)
Get the .pdata section used for the given section.
virtual void EmitSyntaxDirective()
virtual void EmitCFIDefCfaRegister(int64_t Register)
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.
static const unsigned End
void reportError(SMLoc L, const Twine &Msg)
static MCCFIInstruction createRelOffset(MCSymbol *L, unsigned Register, int Offset)
.cfi_rel_offset Previous value of Register is saved at offset Offset from the current CFA register...
static MCCFIInstruction createRestore(MCSymbol *L, unsigned Register)
.cfi_restore says that the rule for Register is now the same as it was at the beginning of the functi...
virtual void EmitRawTextImpl(StringRef String)
EmitRawText - If this file is backed by an assembly streamer, this dumps the specified string in the ...
virtual void EmitWinCFIEndChained()
virtual void EmitWinCFIEndProc()
MCSection * getTextSection() const
virtual void EmitCFIUndefined(int64_t Register)
unsigned PersonalityEncoding
static WinEH::Instruction SetFPReg(MCSymbol *L, unsigned Reg, unsigned Off)
void Finish()
Finish emission of machine code.
virtual void EmitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol)
bool isInSection(bool SetUsed=true) const
isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute)...
bool isIntN(unsigned N, int64_t x)
isIntN - Checks if an signed integer fits into the given (dynamic) bit width.
static MCCFIInstruction createRestoreState(MCSymbol *L)
.cfi_restore_state Restore the previously saved state.
virtual void EmitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except)
Binary assembler expressions.
virtual void EmitCOFFSafeSEH(MCSymbol const *Symbol)
void generateCompactUnwindEncodings(MCAsmBackend *MAB)
virtual bool EmitCVFileDirective(unsigned FileNo, StringRef Filename)
Associate a filename with a specified logical file number.
static MCSection * getWinCFISection(MCContext &Context, unsigned *NextWinCFIID, MCSection *MainCFISec, const MCSection *TextSec)
static WinEH::Instruction SaveXMM(MCSymbol *L, unsigned Reg, unsigned Offset)
virtual void EmitTPRel32Value(const MCExpr *Value)
Emit the expression Value into the output as a tprel (32-bit TP relative) value.
const MCSymbol * PrologEnd
virtual void EmitWinCFIStartChained()
virtual void InitSections(bool NoExecStack)
Create the default sections and set the initial one.
bool doesSetDirectiveSuppressReloc() const
virtual void EmitLabel(MCSymbol *Symbol)
Emit a label for Symbol into the current section.
virtual void EmitWinCFISaveXMM(unsigned Register, unsigned Offset)
virtual void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size)
Emit the absolute difference between two symbols.
virtual void EmitCFIOffset(int64_t Register, int64_t Offset)
StringRef toStringRef(SmallVectorImpl< char > &Out) const
This returns the twine as a single StringRef if it can be represented as such.
const MCSection * TextSection
static WinEH::Instruction Alloc(MCSymbol *L, unsigned Size)
virtual void EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit=0)
Emit nops until the byte alignment ByteAlignment is reached.
Promote Memory to Register
virtual void EmitCVInlineLinetableDirective(unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym)
This implements the CodeView '.cv_inline_linetable' assembler directive.
MCSymbol * getBeginSymbol()
virtual void prettyPrintAsm(MCInstPrinter &InstPrinter, raw_ostream &OS, const MCInst &Inst, const MCSubtargetInfo &STI)
StringRef str()
Return a StringRef for the vector contents.
virtual void EmitWinCFIAllocStack(unsigned Size)
virtual void ChangeSection(MCSection *, const MCExpr *)
Update streamer for a new active section.
void setVariableValue(const MCExpr *Value)
bool hasUnfinishedDwarfFrameInfo()
void encodeSLEB128(int64_t Value, raw_ostream &OS)
Utility function to encode a SLEB128 value to an output stream.
const MCSymbol * Function
void visitUsedExpr(const MCExpr &Expr)
MCTargetStreamer(MCStreamer &S)
const MCExpr * getRHS() const
Get the right-hand side expression of the binary operator.
virtual void EmitCVDefRangeDirective(ArrayRef< std::pair< const MCSymbol *, const MCSymbol * >> Ranges, StringRef FixedSizePortion)
This implements the CodeView '.cv_def_range' assembler directive.
bool recordFunctionId(unsigned FuncId)
Records the function id of a normal function.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
virtual void EmitThumbFunc(MCSymbol *Func)
Note in the output that the specified Func is a Thumb mode function (ARM target only).
virtual void EmitCFISignalFrame()
virtual void EmitCFIRelOffset(int64_t Register, int64_t Offset)
const MCSymbol * Personality
bool recordInlinedCallSiteId(unsigned FuncId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol)
Records the function id of an inlined call site.
unsigned getNumOperands() const
virtual void EmitFileDirective(StringRef Filename)
Switch to a new logical file.
virtual void EmitDTPRel32Value(const MCExpr *Value)
Emit the expression Value into the output as a dtprel (32-bit DTP relative) value.
MCSubtargetInfo - Generic base class for all target subtargets.
virtual void emitELFSize(MCSymbol *Symbol, const MCExpr *Value)
Emit an ELF .size directive.
virtual uint32_t generateCompactUnwindEncoding(ArrayRef< MCCFIInstruction >) const
Generate the compact unwind encoding for the CFI instructions.
References to labels and assigned expressions.
virtual void emitFill(uint64_t NumBytes, uint8_t FillValue)
Emit NumBytes bytes worth of the value specified by FillValue.
virtual void EmitCFIDefCfa(int64_t Register, int64_t Offset)
void EmitULEB128IntValue(uint64_t Value, unsigned Padding=0)
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integ...
MCSymbol * endSection(MCSection *Section)
bool isVariable() const
isVariable - Check if this is a variable symbol.
MCFragment * getFragment(bool SetUsed=true) const
void setCurrentDwarfLoc(unsigned FileNum, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator)
Saves the information from the currently parsed dwarf .loc directive and sets DwarfLocSeen.
CodeViewContext & getCVContext()
virtual void EmitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset)
Emits a COFF section relative relocation.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual void FinishImpl()
Streamer specific finalization.
virtual bool EmitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol, SMLoc Loc)
Introduces an inline call site id for use with .cv_loc.
LLVM Value Representation.
Generic interface to target specific assembler backends.
const MCObjectFileInfo * getObjectFileInfo() const
unsigned getDwarfFile(StringRef Directory, StringRef FileName, unsigned FileNumber, unsigned CUID)
Creates an entry in the dwarf file and directory tables.
static cl::opt< bool, true > Debug("debug", cl::desc("Enable debug output"), cl::Hidden, cl::location(DebugFlag))
virtual bool EmitCVFuncIdDirective(unsigned FunctionId)
Introduces a function id for use with .cv_loc.
virtual void EmitWinCFIStartProc(const MCSymbol *Symbol)
raw_ostream & nulls()
This returns a reference to a raw_ostream which simply discards output.
This class implements an extremely fast bulk output stream that can only output to a stream...
void encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned Padding=0)
Utility function to encode a ULEB128 value to an output stream.
virtual void EmitWinCFISaveReg(unsigned Register, unsigned Offset)
virtual void EmitWinCFIPushFrame(bool Code)
StringRef - Represent a constant reference to a string, i.e.
Target specific expression.
Information describing a function or inlined call site introduced by .cv_func_id or ...
virtual void visitUsedSymbol(const MCSymbol &Sym)
Represents a location in source code.
static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals)
.cfi_escape Allows the user to add arbitrary bytes to the unwind info.
bool isUIntN(unsigned N, uint64_t x)
isUIntN - Checks if an unsigned integer fits into the given (dynamic) bit width.
const MCSymbol * ExceptionHandler
void setTargetStreamer(MCTargetStreamer *TS)
virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)
virtual void EmitCOFFSectionIndex(MCSymbol const *Symbol)
Emits a COFF section index.
virtual void EmitCFIAdjustCfaOffset(int64_t Adjustment)
void setLabel(MCSymbol *Label)
const MCOperand & getOperand(unsigned i) const
static MCCFIInstruction createRegister(MCSymbol *L, unsigned Register1, unsigned Register2)
.cfi_register Previous value of Register1 is saved in register Register2.
virtual void EmitWinCFISetFrame(unsigned Register, unsigned Offset)
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue)
Set the DescValue for the Symbol.
virtual void EmitCFIWindowSave()
MCSection * getAssociatedXDataSection(const MCSection *TextSec)
Get the .xdata section used for the given section.
bool usesWindowsCFI() const
Holds state from .cv_file and .cv_loc directives for later emission.