LLVM  8.0.0svn
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:
Inheritance graph
[legend]
Collaboration diagram for llvm::DbgVariable:
Collaboration graph
[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 (const MachineInstr *DbgValue)
 Initialize from a DBG_VALUE instruction. More...
 
const DILocalVariablegetVariable () const
 
const DIExpressiongetSingleExpression () const
 
void setDebugLocListIndex (unsigned O)
 
unsigned getDebugLocListIndex () const
 
StringRef getName () const
 
const MachineInstrgetMInsn () 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
 
bool isBlockByrefVariable () const
 
const DITypegetType () const
 
- Public Member Functions inherited from llvm::DbgEntity
 DbgEntity (const DINode *N, const DILocation *IA, unsigned ID)
 
virtual ~DbgEntity ()
 
void setDIE (DIE &D)
 
const DINodegetEntity () const
 Accessors. More...
 
const DILocationgetInlinedAt () const
 
DIEgetDIE () 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 instruction use MInsn and (optionally) a single entry of Expr.

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

Definition at line 117 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 133 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 173 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 235 of file DwarfDebug.cpp.

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

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

◆ getMInsn()

const MachineInstr* llvm::DbgVariable::getMInsn ( ) const
inline

Definition at line 175 of file DwarfDebug.h.

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

◆ getName()

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

Definition at line 174 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 182 of file DwarfDebug.h.

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

◆ getType()

const DIType * DbgVariable::getType ( ) const

◆ 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 178 of file DwarfDebug.h.

References llvm::SmallVectorBase::empty().

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

◆ initializeDbgValue()

void llvm::DbgVariable::initializeDbgValue ( const MachineInstr DbgValue)
inline

◆ 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 191 of file DwarfDebug.h.

References getType().

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

◆ isBlockByrefVariable()

bool DbgVariable::isBlockByrefVariable ( ) const

Definition at line 185 of file DwarfDebug.cpp.

References assert().

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

◆ isObjectPointer()

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

Definition at line 199 of file DwarfDebug.h.

References getType().

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

◆ setDebugLocListIndex()

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

Definition at line 172 of file DwarfDebug.h.

References llvm::RISCVFenceField::O.


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