LLVM  11.0.0git
Classes | Public Member Functions | List of all members
llvm::DebugLocDwarfExpression Class Referencefinal

DwarfExpression implementation for .debug_loc entries. More...

#include "CodeGen/AsmPrinter/DwarfExpression.h"

Inheritance diagram for llvm::DebugLocDwarfExpression:
Inheritance graph
Collaboration diagram for llvm::DebugLocDwarfExpression:
Collaboration graph

Public Member Functions

 DebugLocDwarfExpression (unsigned DwarfVersion, BufferByteStreamer &BS, DwarfCompileUnit &CU)
- Public Member Functions inherited from llvm::DwarfExpression
void setLocation (const MachineLocation &Loc, const DIExpression *DIExpr)
 Set the location (Loc) and DIExpression (DIExpr) to describe. More...
bool isUnknownLocation () const
bool isMemoryLocation () const
bool isRegisterLocation () const
bool isImplicitLocation () const
bool isEntryValue () const
bool isIndirect () const
bool isParameterValue ()
 DwarfExpression (unsigned DwarfVersion, DwarfCompileUnit &CU)
void finalize ()
 This needs to be called last to commit any pending changes. More...
void addSignedConstant (int64_t Value)
 Emit a signed constant. More...
void addUnsignedConstant (uint64_t Value)
 Emit an unsigned constant. More...
void addUnsignedConstant (const APInt &Value)
 Emit an unsigned constant. More...
void setMemoryLocationKind ()
 Lock this down to become a memory location description. More...
void setEntryValueFlags (const MachineLocation &Loc)
 Lock this down to become an entry value location. More...
void setCallSiteParamValueFlag ()
 Lock this down to become a call site parameter location. More...
bool addMachineRegExpression (const TargetRegisterInfo &TRI, DIExpressionCursor &Expr, unsigned MachineReg, unsigned FragmentOffsetInBits=0)
 Emit a machine register location. More...
void beginEntryValueExpression (DIExpressionCursor &ExprCursor)
 Begin emission of an entry value dwarf operation. More...
unsigned getOrCreateBaseType (unsigned BitSize, dwarf::TypeKind Encoding)
 Return the index of a base type with the given properties and create one if necessary. More...
void addExpression (DIExpressionCursor &&Expr, unsigned FragmentOffsetInBits=0)
 Emit all remaining operations in the DIExpressionCursor. More...
void addFragmentOffset (const DIExpression *Expr)
 If applicable, emit an empty DW_OP_piece / DW_OP_bit_piece to advance to the fragment described by Expr. More...
void emitLegacySExt (unsigned FromBits)
void emitLegacyZExt (unsigned FromBits)
void addWasmLocation (unsigned Index, uint64_t Offset)
 Emit location information expressed via WebAssembly location + offset The Index is an identifier for locals, globals or operand stack. More...

Additional Inherited Members

- Public Attributes inherited from llvm::DwarfExpression
Optional< uint8_t > TagOffset
- Protected Types inherited from llvm::DwarfExpression
enum  { Unknown = 0, Register, Memory, Implicit }
 The kind of location description being produced. More...
enum  { EntryValue = 1 << 0, Indirect = 1 << 1, CallSiteParamValue = 1 << 2 }
 Additional location flags which may be combined with any location kind. More...
- Protected Member Functions inherited from llvm::DwarfExpression
void setSubRegisterPiece (unsigned SizeInBits, unsigned OffsetInBits)
 Push a DW_OP_piece / DW_OP_bit_piece for emitting later, if one is needed to represent a subregister. More...
void maskSubRegister ()
 Add masking operations to stencil out a subregister. More...
void emitConstu (uint64_t Value)
 Emit a normalized unsigned constant. More...
void addReg (int DwarfReg, const char *Comment=nullptr)
 Emit a DW_OP_reg operation. More...
void addBReg (int DwarfReg, int Offset)
 Emit a DW_OP_breg operation. More...
void addFBReg (int Offset)
 Emit DW_OP_fbreg <Offset>. More...
bool addMachineReg (const TargetRegisterInfo &TRI, unsigned MachineReg, unsigned MaxSize=~1U)
 Emit a partial DWARF register operation. More...
void addOpPiece (unsigned SizeInBits, unsigned OffsetInBits=0)
 Emit a DW_OP_piece or DW_OP_bit_piece operation for a variable fragment. More...
void addShr (unsigned ShiftBy)
 Emit a shift-right dwarf operation. More...
void addAnd (unsigned Mask)
 Emit a bitwise and dwarf operation. More...
void addStackValue ()
 Emit a DW_OP_stack_value, if supported. More...
void finalizeEntryValue ()
 Finalize an entry value by emitting its size operand, and committing the DWARF block which has been emitted to the temporary buffer. More...
void cancelEntryValue ()
 Cancel the emission of an entry value. More...
 ~DwarfExpression ()=default
- Protected Attributes inherited from llvm::DwarfExpression
bool IsEmittingEntryValue = false
 Whether we are currently emitting an entry value operation. More...
SmallVector< Register, 2 > DwarfRegs
 The register location, if any. More...
uint64_t OffsetInBits = 0
 Current Fragment Offset in Bits. More...
unsigned SubRegisterSizeInBits: 16
 Sometimes we need to add a DW_OP_bit_piece to describe a subregister. More...
unsigned SubRegisterOffsetInBits: 16
unsigned LocationKind: 3
unsigned LocationFlags: 3
unsigned DwarfVersion: 4

Detailed Description

DwarfExpression implementation for .debug_loc entries.

Definition at line 359 of file DwarfExpression.h.

Constructor & Destructor Documentation

◆ DebugLocDwarfExpression()

llvm::DebugLocDwarfExpression::DebugLocDwarfExpression ( unsigned  DwarfVersion,
BufferByteStreamer BS,
DwarfCompileUnit CU 

Definition at line 391 of file DwarfExpression.h.

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