LLVM 20.0.0git
|
This class is used to track local variable information. More...
#include "CodeGen/AsmPrinter/DwarfDebug.h"
Public Member Functions | |
Loc::Variant & | asVariant () |
To workaround P2162R0 https://github.com/cplusplus/papers/issues/873 the base class subobject needs to be passed directly to std::visit, so expose it directly here. | |
const Loc::Variant & | asVariant () const |
template<typename T > | |
bool | holds () const |
Member shorthand for std::holds_alternative. | |
template<typename T > | |
auto & | get () noexcept |
Asserting, noexcept member alternative to std::get. | |
template<typename T > | |
const auto & | get () const noexcept |
Asserting, noexcept member alternative to std::get. | |
DbgVariable (const DILocalVariable *V, const DILocation *IA) | |
Construct a DbgVariable. | |
const DILocalVariable * | getVariable () const |
StringRef | getName () const |
dwarf::Tag | getTag () const |
bool | isArtificial () const |
Return true if DbgVariable is artificial. | |
bool | isObjectPointer () const |
const DIType * | getType () const |
Public Member Functions inherited from llvm::DbgEntity | |
DbgEntity (const DINode *N, const DILocation *IA, DbgEntityKind ID) | |
virtual | ~DbgEntity ()=default |
void | setDIE (DIE &D) |
const DINode * | getEntity () const |
Accessors. | |
const DILocation * | getInlinedAt () const |
DIE * | getDIE () const |
DbgEntityKind | 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 } |
This class is used to track local variable information.
Variables that have been optimized out hold the monostate
alternative. This is not distinguished from the case of a constructed DbgVariable
which has not be initialized yet.
Variables can be created from allocas, in which case they're generated from the MMI table. Such variables hold the Loc::MMI
alternative which can have multiple expressions and frame indices.
Variables can be created from the entry value of registers, in which case they're generated from the MMI table. Such variables hold the EntryValueLoc
alternative which can either have a single expression or multiple fragment expressions.
Variables can be created from DBG_VALUE
instructions. Those whose location changes over time hold a Loc::Multi
alternative which uses DebugLocListIndex
and (optionally) DebugLocListTagOffset
, while those with a single location hold a Loc::Single
alternative which use ValueLoc
and (optionally) a single Expr
.
Definition at line 214 of file DwarfDebug.h.
|
inline |
Construct a DbgVariable.
Creates a variable without any DW_AT_location.
Definition at line 242 of file DwarfDebug.h.
|
inline |
To workaround P2162R0 https://github.com/cplusplus/papers/issues/873 the base class subobject needs to be passed directly to std::visit, so expose it directly here.
Definition at line 220 of file DwarfDebug.h.
Referenced by llvm::DwarfCompileUnit::constructVariableDIE().
|
inline |
Definition at line 221 of file DwarfDebug.h.
Definition at line 280 of file DwarfDebug.h.
References llvm::DbgEntity::DbgVariableKind, and N.
Asserting, noexcept member alternative to std::get.
Definition at line 234 of file DwarfDebug.h.
References assert().
|
inlinenoexcept |
Asserting, noexcept member alternative to std::get.
Definition at line 229 of file DwarfDebug.h.
References assert().
|
inline |
Definition at line 250 of file DwarfDebug.h.
References llvm::DIVariable::getName(), and getVariable().
Referenced by llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes().
|
inline |
Definition at line 253 of file DwarfDebug.h.
References getVariable().
Referenced by llvm::DwarfCompileUnit::constructVariableDIE().
Definition at line 230 of file DwarfDebug.cpp.
References llvm::DIVariable::getType(), and getVariable().
Referenced by llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes(), dependencies(), isArtificial(), and isObjectPointer().
|
inline |
Definition at line 246 of file DwarfDebug.h.
References llvm::DbgEntity::getEntity().
Referenced by llvm::DwarfFile::addScopeVariable(), llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes(), llvm::DwarfCompileUnit::constructVariableDIE(), getName(), getTag(), getType(), isArtificial(), and isObjectPointer().
Member shorthand for std::holds_alternative.
Definition at line 225 of file DwarfDebug.h.
|
inline |
Return true if DbgVariable is artificial.
Definition at line 262 of file DwarfDebug.h.
References getType(), getVariable(), and isArtificial().
Referenced by llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes(), and isArtificial().
|
inline |
Definition at line 270 of file DwarfDebug.h.
References getType(), getVariable(), and isObjectPointer().
Referenced by llvm::DwarfCompileUnit::constructVariableDIE(), and isObjectPointer().