LLVM  6.0.0svn
Classes | 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"

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 DILocationgetInlinedAt () const
 
const DIExpressiongetSingleExpression () const
 
void setDIE (DIE &D)
 
DIEgetDIE () 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
 

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 76 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 95 of file DwarfDebug.h.

Member Function Documentation

◆ addMMIEntry()

void DbgVariable::addMMIEntry ( const DbgVariable V)

◆ getDebugLocListIndex()

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

Definition at line 135 of file DwarfDebug.h.

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

◆ getDIE()

DIE* llvm::DbgVariable::getDIE ( ) const
inline

Definition at line 133 of file DwarfDebug.h.

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

◆ getFrameIndexExprs()

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

Get the FI entries, sorted by fragment offset.

Definition at line 209 of file DwarfDebug.cpp.

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

Referenced by llvm::DwarfCompileUnit::constructVariableDIE(), and getMInsn().

◆ getInlinedAt()

const DILocation* llvm::DbgVariable::getInlinedAt ( ) const
inline

Definition at line 125 of file DwarfDebug.h.

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

◆ getMInsn()

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

Definition at line 137 of file DwarfDebug.h.

References getFrameIndexExprs().

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

◆ getName()

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

◆ getSingleExpression()

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

◆ getTag()

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

◆ 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

◆ 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

◆ isBlockByrefVariable()

bool DbgVariable::isBlockByrefVariable ( ) const

Definition at line 159 of file DwarfDebug.cpp.

References assert().

Referenced by llvm::DwarfCompileUnit::addVariableAddress(), and hasComplexAddress().

◆ isObjectPointer()

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

◆ setDebugLocListIndex()

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

Definition at line 134 of file DwarfDebug.h.

References llvm::RISCVFenceField::O.

◆ setDIE()

void llvm::DbgVariable::setDIE ( DIE D)
inline

Definition at line 132 of file DwarfDebug.h.

References D.

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


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