class DbgVariable

Declaration

class DbgVariable : public DbgEntity { /* full declaration omitted */ };

Description

This class is used to track local variable information. Variables can be created from allocas, in which case they're generated from the MMI table. Such variables can have multiple expressions and frame indices. Variables can be created from \c DBG_VALUE instructions. Those whose location changes over time use \a DebugLocListIndex, while those with a single location use \a ValueLoc and (optionally) a single entry of \a Expr. Variables that have been optimized out use none of these fields.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:115

Inherits from: DbgEntity

Member Variables

private unsigned int DebugLocListIndex = ~0U
Index of the entry list in DebugLocs.
private Optional<uint8_t> DebugLocListTagOffset
DW_OP_LLVM_tag_offset value from DebugLocs.
private std::unique_ptr<DbgValueLoc> ValueLoc = nullptr
Single value location description.
private SmallVector<llvm::DbgVariable::FrameIndexExpr, 1> FrameIndexExprs

Method Overview

Inherited from DbgEntity:

Methods

DbgVariable(const llvm::DILocalVariable* V,
            const llvm::DILocation* IA)

Description

Construct a DbgVariable. Creates a variable without any DW_AT_location. Call \a initializeMMI() for MMI entries, or \a initializeDbgValue() for DBG_VALUE instructions.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:136

Parameters

const llvm::DILocalVariable* V
const llvm::DILocation* IA

void addMMIEntry(const llvm::DbgVariable& V)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:184

Parameters

const llvm::DbgVariable& V

static bool classof(const llvm::DbgEntity* N)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:223

Parameters

const llvm::DbgEntity* N

unsigned int getDebugLocListIndex() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:176

Optional<uint8_t> getDebugLocListTagOffset() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:178

ArrayRef<llvm::DbgVariable::FrameIndexExpr>
getFrameIndexExprs() const

Description

Get the FI entries, sorted by fragment offset.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:182

llvm::StringRef getName() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:179

const llvm::DIExpression* getSingleExpression()
    const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:170

dwarf::Tag getTag() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:187

const llvm::DIType* getType() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:221

const llvm::DbgValueLoc* getValueLoc() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:180

const llvm::DILocalVariable* getVariable() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:166

bool hasComplexAddress() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:212

bool hasFrameIndexExprs() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:183

void initializeDbgValue(
    const llvm::MachineInstr* DbgValue)

Description

Initialize from a DBG_VALUE instruction.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:163

Parameters

const llvm::MachineInstr* DbgValue

void initializeDbgValue(llvm::DbgValueLoc Value)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:151

Parameters

llvm::DbgValueLoc Value

void initializeMMI(const llvm::DIExpression* E,
                   int FI)

Description

Initialize from the MMI table.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:140

Parameters

const llvm::DIExpression* E
int FI

bool isArtificial() const

Description

Return true if DbgVariable is artificial.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:196

bool isObjectPointer() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:204

void setDebugLocListIndex(unsigned int O)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:175

Parameters

unsigned int O

void setDebugLocListTagOffset(uint8_t O)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:177

Parameters

uint8_t O