LLVM  10.0.0
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::DbgVariable Class Reference

This class is used to track local variable information. More...

#include "CodeGen/AsmPrinter/DwarfDebug.h"

Inheritance diagram for llvm::DbgVariable:
[legend]
Collaboration diagram for llvm::DbgVariable:
[legend]

Public Member Functions

 DbgVariable (const DILocalVariable *V, const DILocation *IA)
 Frame index + expression. More...
 
void initializeMMI (const DIExpression *E, int FI)
 Initialize from the MMI table. More...
 
void initializeDbgValue (DbgValueLoc Value)
 
void initializeDbgValue (const MachineInstr *DbgValue)
 Initialize from a DBG_VALUE instruction. More...
 
const DILocalVariable * getVariable () const
 
const DIExpression * getSingleExpression () const
 
void setDebugLocListIndex (unsigned O)
 
unsigned getDebugLocListIndex () const
 
void setDebugLocListTagOffset (uint8_t O)
 
Optional< uint8_t > getDebugLocListTagOffset () const
 
StringRef getName () const
 
const DbgValueLoc * getValueLoc () const
 
ArrayRef< FrameIndexExpr > getFrameIndexExprs () const
 Get the FI entries, sorted by fragment offset. More...
 
bool hasFrameIndexExprs () const
 
void addMMIEntry (const DbgVariable &V)
 
dwarf::Tag getTag () const
 
bool isArtificial () const
 Return true if DbgVariable is artificial. More...
 
bool isObjectPointer () const
 
bool hasComplexAddress () const
 
const DIType * getType () const
 
- Public Member Functions inherited from llvm::DbgEntity
 DbgEntity (const DINode *N, const DILocation *IA, unsigned ID)
 
virtual ~DbgEntity ()
 
void setDIE (DIE &D)
 
const DINode * getEntity () const
 Accessors. More...
 
const DILocation * getInlinedAt () const
 
DIE * getDIE () const
 
unsigned getDbgEntityID () const
 

Static Public Member Functions

static bool classof (const DbgEntity *N)
 
- Static Public Member Functions inherited from llvm::DbgEntity
static bool classof (const DbgEntity *N)
 

Additional Inherited Members

- Public Types inherited from llvm::DbgEntity
enum  DbgEntityKind { DbgVariableKind, DbgLabelKind }
 

Detailed 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 DBG_VALUE instructions. Those whose location changes over time use DebugLocListIndex, while those with a single location use ValueLoc and (optionally) a single entry of Expr.

Variables that have been optimized out use none of these fields.

Definition at line 118 of file DwarfDebug.h.

Constructor & Destructor Documentation

◆ DbgVariable()

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

Frame index + expression.

Construct a DbgVariable.

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

Definition at line 139 of file DwarfDebug.h.

Member Function Documentation

◆ addMMIEntry()

void DbgVariable::addMMIEntry ( const DbgVariable &  V)

◆ classof()

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

◆ getDebugLocListIndex()

unsigned llvm::DbgVariable::getDebugLocListIndex ( ) const
inline

Definition at line 179 of file DwarfDebug.h.

Referenced by llvm::DwarfCompileUnit::constructLabelDIE().

◆ getDebugLocListTagOffset()

Optional<uint8_t> llvm::DbgVariable::getDebugLocListTagOffset ( ) const
inline

Definition at line 181 of file DwarfDebug.h.

Referenced by llvm::DwarfCompileUnit::constructLabelDIE().

◆ getFrameIndexExprs()

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

Get the FI entries, sorted by fragment offset.

Definition at line 273 of file DwarfDebug.cpp.

References llvm::all_of(), assert(), B, and llvm::sort().

Referenced by llvm::DwarfCompileUnit::constructLabelDIE().

◆ getName()

StringRef llvm::DbgVariable::getName ( ) const
inline

Definition at line 182 of file DwarfDebug.h.

Referenced by llvm::DwarfCompileUnit::applyVariableAttributes().

◆ getSingleExpression()

const DIExpression* llvm::DbgVariable::getSingleExpression ( ) const
inline

◆ getTag()

dwarf::Tag llvm::DbgVariable::getTag ( ) const
inline

Definition at line 190 of file DwarfDebug.h.

Referenced by llvm::DwarfCompileUnit::constructLabelDIE().

◆ getType()

const DIType * DbgVariable::getType ( ) const

◆ getValueLoc()

const DbgValueLoc* llvm::DbgVariable::getValueLoc ( ) const
inline

Definition at line 183 of file DwarfDebug.h.

Referenced by llvm::DwarfCompileUnit::constructLabelDIE().

◆ getVariable()

const DILocalVariable* llvm::DbgVariable::getVariable ( ) const
inline

◆ hasComplexAddress()

bool llvm::DbgVariable::hasComplexAddress ( ) const
inline

◆ hasFrameIndexExprs()

bool llvm::DbgVariable::hasFrameIndexExprs ( ) const
inline

Definition at line 186 of file DwarfDebug.h.

References llvm::SmallVectorBase::empty().

Referenced by llvm::DwarfCompileUnit::constructLabelDIE().

◆ initializeDbgValue() [1/2]

void llvm::DbgVariable::initializeDbgValue ( DbgValueLoc  Value)
inline

◆ initializeDbgValue() [2/2]

void DbgVariable::initializeDbgValue ( const MachineInstr *  DbgValue)

◆ initializeMMI()

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

◆ isArtificial()

bool llvm::DbgVariable::isArtificial ( ) const
inline

Return true if DbgVariable is artificial.

Definition at line 199 of file DwarfDebug.h.

References getType().

Referenced by llvm::DwarfCompileUnit::applyVariableAttributes().

◆ isObjectPointer()

bool llvm::DbgVariable::isObjectPointer ( ) const
inline

Definition at line 207 of file DwarfDebug.h.

References getType().

Referenced by llvm::DwarfCompileUnit::constructVariableDIE().

◆ setDebugLocListIndex()

void llvm::DbgVariable::setDebugLocListIndex ( unsigned  O)
inline

Definition at line 178 of file DwarfDebug.h.

References llvm::RISCVFenceField::O.

◆ setDebugLocListTagOffset()

void llvm::DbgVariable::setDebugLocListTagOffset ( uint8_t  O)
inline

Definition at line 180 of file DwarfDebug.h.

References llvm::RISCVFenceField::O.


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