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

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

#include <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 64 of file DwarfDebug.h.

Constructor & Destructor Documentation

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

Member Function Documentation

void llvm::DbgVariable::addMMIEntry ( const DbgVariable V)
inline
unsigned llvm::DbgVariable::getDebugLocListIndex ( ) const
inline

Definition at line 121 of file DwarfDebug.h.

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

Definition at line 119 of file DwarfDebug.h.

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

Get the FI entries, sorted by fragment offset.

Definition at line 202 of file DwarfDebug.cpp.

References A, B, llvm::SmallVectorTemplateCommon< T, typename >::begin(), and llvm::SmallVectorTemplateCommon< T, typename >::end().

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

Definition at line 113 of file DwarfDebug.h.

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

Definition at line 123 of file DwarfDebug.h.

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

Definition at line 114 of file DwarfDebug.h.

References assert().

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

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

Definition at line 146 of file DwarfDebug.h.

const DIType * DbgVariable::getType ( ) const
const DILocalVariable* llvm::DbgVariable::getVariable ( ) const
inline
bool llvm::DbgVariable::hasComplexAddress ( ) const
inline

Definition at line 170 of file DwarfDebug.h.

References assert().

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

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

Definition at line 126 of file DwarfDebug.h.

void llvm::DbgVariable::initializeDbgValue ( const MachineInstr DbgValue)
inline
void llvm::DbgVariable::initializeMMI ( const DIExpression E,
int  FI 
)
inline
bool llvm::DbgVariable::isArtificial ( ) const
inline

Return true if DbgVariable is artificial.

Definition at line 154 of file DwarfDebug.h.

References llvm::Intrinsic::getType().

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

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

Definition at line 162 of file DwarfDebug.h.

References llvm::Intrinsic::getType().

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

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

Definition at line 120 of file DwarfDebug.h.

Referenced by llvm::DebugLocStream::ListBuilder::~ListBuilder().

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

Definition at line 118 of file DwarfDebug.h.

References D.

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


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