Record of a variable value‐assignment, aka a non instruction representation of the dbg.value intrinsic.
Synopsis
Declared in <llvm/IR/DebugProgramInstruction.h>
class DbgVariableRecord
: public DbgRecord
, protected DebugValueUser
Description
This class inherits from DebugValueUser to allow LLVM's metadata facilities to update our references to metadata beneath our feet.
Base Classes
Name |
Description |
Base class for non‐instruction debug metadata records that have positions within IR. Features various methods copied across from the Instruction class to aid ease‐of‐use. DbgRecords should always be linked into a DbgMarker's StoredDbgRecords list. The marker connects a DbgRecord back to its position in the BasicBlock. |
Protected Base Classes
Name |
Description |
Base class for tracking ValueAsMetadata/DIArgLists with user lookups and Owner callbacks outside of ValueAsMetadata. |
Types
Name |
Description |
Iterator for ValueAsMetadata that internally uses direct pointer iteration over either a ValueAsMetadata* or a ValueAsMetadata**, dereferencing to the ValueAsMetadata . |
Type Aliases
Enums
Name |
Description |
Subclass discriminator. |
|
Member Functions
Name |
Description |
|
Constructors |
Adding a new location operand will always result in this intrinsic using an ArgList, and must always be accompanied by a new expression that uses the new operand. |
|
@} |
|
Convert this DbgVariableRecord back into a dbg.value intrinsic. |
|
Methods that dispatch to subclass implementations. These need to be manually updated when a new subclass is added.@{ |
|
Get the FragmentInfo for the variable if it exists, otherwise return a FragmentInfo that covers the entire variable if the variable size is known, otherwise return a zero‐sized fragment. |
|
Get the size (in bits) of the variable, or fragment of the variable that is described. |
|
Returns the metadata operand for the first location description. i.e., dbg intrinsic dbg.value,declare operand and dbg.assign 1st location operand (the "value componenet"). Note the operand (singular) may be a DIArgList which is a list of values. |
|
Returns true if this DbgVariableRecord has no empty MDNodes in its location list. |
|
Does this describe the address of a local variable. True for dbg.addr and dbg.declare, but not dbg.value or dbg.declare_value, which describes its value. |
|
@{ |
|
Same as isIdenticalToWhenDefined but checks DebugLoc too. |
|
Check whether this kills the address component. This doesn't take into account the position of the intrinsic, therefore a returned value of false does not guarantee the address is a valid location for the variable at the intrinsic's position in IR. |
|
Determine if this describes the value of a local variable. It is false for dbg.declare, but true for dbg.value and dbg.declare_value, which describes its value. |
|
Get the locations corresponding to the variable referenced by the debug info intrinsic. Depending on the intrinsic, this could be the variable's value or its address. |
|
Kill the address component. |
|
Use of this should generally be avoided; instead, replaceVariableLocationOp and addVariableLocationOps should be used where possible to avoid creating invalid state. |
|
Static Member Functions
Name |
Description |
Support type inquiry through isa, cast, and dyn_cast. |
|
Used to create DbgVariableRecords during parsing, where some metadata references may still be unresolved. Although for some fields a generic |
Data Members
Name |
Description |
Marker that this DbgRecord is linked into. |
|
Classification of the debug‐info record that this DbgVariableRecord represents. Essentially, "does this correspond to a dbg.value, dbg.declare, or dbg.assign?". FIXME: We could use spare padding bits from DbgRecord for this. |
|
Protected Member Functions
Name |
Description |
Assignment operators |
|
To be called by ReplaceableMetadataImpl::replaceAllUsesWith, where |
|
Equality operator |
|
Inequality operator |
Protected Data Members
Name |
Description |
Subclass discriminator. |
Friends
Name |
Description |
Base class for tracking ValueAsMetadata/DIArgLists with user lookups and Owner callbacks outside of ValueAsMetadata. |
Non-Member Functions
Name |
Description |
Inserts a dbg.value record after a phi that has an associated llvm.dbg.declare record. |
|
Inserts a dbg.value record before a store to an alloca'd value that has an associated dbg.declare record. |
|
Inserts a dbg.value record before a load of an alloca'd value that has an associated dbg.declare record. |
|
Creates and inserts a dbg_value record intrinsic before a store that has an associated llvm.dbg.value intrinsic. |
|
As above, for DVRDeclareValues. |
|
Finds dbg.declare records declaring local variables as living in the memory that 'V' points to. |
|
As above, for DVRValues. |
|
Produce a DebugLoc to use for each dbg.declare that is promoted to a dbg.value. |
|
Return a range of dbg_assign records for which |
Created with MrDocs