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

DbgRecord

Base class for non‐instruction debug metadata records positioned in IR.

Protected Base Classes

Name

Description

DebugValueUser

Base class for tracking ValueAsMetadata/DIArgLists with user lookups and Owner callbacks outside of ValueAsMetadata.

Types

Name

Description

location_op_iterator

Bidirectional iterator over location operands as Value pointers.

Type Aliases

Name

Description

const_self_iterator

Const iterator over DbgRecord nodes in a marker's list.

self_iterator

Iterator over DbgRecord nodes in a marker's list.

Enums

Name

Description

Kind

Subclass discriminator.

LocationType

Kind of variable location this record describes.

Member Functions

Name

Description

DbgVariableRecord [constructor]

Constructors

addVariableLocationOps

Append location operands and update the expression that uses them.

clone

Clone this variable record.

createDebugIntrinsic

Convert this DbgVariableRecord back into a dbg.value intrinsic.

deleteRecord

@{ Delete this record, dispatching to the correct subclass destructor.

dump

Dump this record to stderr for debugging.

eraseFromParent

Unlink this record from its marker and destroy it.

getAddress

Return the address component of a dbg.assign.

getAddressExpression

Return the DIExpression applied to the address component.

getAssignID

Return the DIAssignID that links this assign record to its store.

getBlock

Return the basic block that contains this debug record.

getContext

Return the LLVM context that owns this debug record.

getDebugLoc

Return the source location associated with this debug record.

getExpression

Return the DIExpression applied to the location/value component.

getFragment

Return fragment info for the variable if the expression describes one.

getFragmentOrEntireVariable

Return fragment info, or a fragment covering the whole variable if known.

getFragmentSizeInBits

Get the size (in bits) of the variable, or fragment of the variable that is described.

getFunction

Return the function that contains this debug record.

getInstruction

Return the instruction whose program position this record is attached to.

getMarker

Return the DbgMarker that links this record to its position in a block.

getModule

Return the module that contains this debug record.

getNextNode

Return the next DbgRecord in this marker's list.

getNumVariableLocationOps

Return the number of location operands describing this variable.

getParent

Return the basic block that contains this debug record.

getPrevNode

Return the previous DbgRecord in this marker's list.

getRawAddress

Return the address metadata operand without type checking.

getRawAddressExpression

Return the address DIExpression metadata node without type checking.

getRawAssignID

Return the assign ID metadata operand without type checking.

getRawExpression

Return the expression metadata node without type checking.

getRawLocation

Return the metadata operand for the first location description.

getRawVariable

Return the variable metadata node without type checking.

getRecordKind

Return the subclass discriminator for this record.

getType

Return whether this is a declare, value, or assign‐style variable record.

getValue

Return the value at location operand OpIdx (default: the first).

getVariable

Return the local variable described by this record.

getVariableLocationOp

Return the value at location operand index OpIdx.

hasArgList

Return true if this record's location is a DIArgList of values.

hasValidLocation

Returns true if this DbgVariableRecord has no empty MDNodes in its location list.

insertAfter

insertAfter overloads

insertBefore

insertBefore overloads

isAddressOfVariable

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.

isDbgAssign

@{ Return true if this record corresponds to a dbg.assign.

isDbgDeclare

Return true if this record corresponds to a dbg.declare.

isDbgDeclareValue

Return true if this record corresponds to a dbg.declare_value.

isDbgValue

Return true if this record corresponds to a dbg.value.

isEquivalentTo

isEquivalentTo overloads

isIdenticalToWhenDefined

isIdenticalToWhenDefined overloads

isKillAddress

Return true if the address component is a kill/undef.

isKillLocation

Return true if the location is undef, empty, or otherwise marks a kill.

isValueOfVariable

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.

location_ops

Get the locations corresponding to the referenced variable.

moveAfter

moveAfter overloads

moveBefore

moveBefore overloads

print

print overloads

removeFromParent

Unlink this record from its marker without destroying it.

replaceVariableLocationOp

replaceVariableLocationOp overloads

setAddress

Set the address component of a dbg.assign to V.

setAddressExpression

Set the DIExpression applied to the address component of a dbg.assign.

setAssignId

Set the DIAssignID that links this assign record to its store.

setDebugLoc

Set the source location associated with this debug record.

setExpression

Set the DIExpression that describes how to interpret the location.

setKillAddress

Kill the address component.

setKillLocation

Mark the variable location as a kill/undef.

setMarker

Associate this record with the given DbgMarker position in a block.

setRawLocation

Set the raw location metadata operand directly.

setVariable

Set the local variable described by this record.

Static Member Functions

Name

Description

classof

Support type inquiry through isa, cast, and dyn_cast.

createDVRAssign

Create a dbg.assign‐style record linking a value, address, and assign ID.

createDVRDeclare

createDVRDeclare overloads

createDVRDeclareValue

createDVRDeclareValue overloads

createDbgVariableRecord

createDbgVariableRecord overloads

createLinkedDVRAssign

Create a dbg.assign record and link it to LinkedInstr's assign ID.

createUnresolvedDbgVariableRecord

Create a variable record during parsing with possibly unresolved metadata.

Data Members

Name

Description

AddressExpression

DIExpression applied to the address component of a dbg.assign.

Expression

DIExpression applied to the location/value component.

Marker

Marker that this DbgRecord is linked into.

Type

Classification of whether this is a dbg.value, dbg.declare, or dbg.assign.

Variable

Local variable described by this debug‐info record.

Protected Member Functions

Name

Description

operator=

Assignment operators

getDebugValues

Return the tracked debug‐value metadata operands.

getUser

Return the owning DbgVariableRecord that holds these debug‐value operands.

handleChangedValue

Update a tracked debug‐value pointer after RAUW.

resetDebugValue

Replace the debug‐value operand at Idx with DebugValue.

resetDebugValues

Clear and untrack all debug‐value operands.

operator==

Return true if the tracked debug‐value operands equal those of X.

operator!=

Return true if the tracked debug‐value operands differ from X.

Protected Data Members

Name

Description

DbgLoc

Source location associated with this debug record.

DebugValues

Tracked debug‐value metadata operands (up to three).

RecordKind

Subclass discriminator.

Friends

Name

Description

llvm::DebugValueUser

Base class for tracking ValueAsMetadata/DIArgLists with user lookups and Owner callbacks outside of ValueAsMetadata.

Non-Member Functions

Name

Description

ConvertDebugDeclareToDebugValue

Convert a dbg.declare into a dbg.value after a PHI.

ConvertDebugDeclareToDebugValue

Convert a dbg.declare into a dbg.value at a store.

ConvertDebugDeclareToDebugValue

Convert a dbg.declare into a dbg.value at a load.

InsertDebugValueAtStoreLoc

Insert a dbg.value before a store with an associated dbg.value.

findDVRDeclareValues

As above, for DVRDeclareValues.

findDVRDeclares

Finds dbg.declare records declaring local variables as living in the memory that 'V' points to.

findDVRValues

As above, for DVRValues.

getDebugValueLoc

Produce a DebugLoc to use for each dbg.declare that is promoted to a dbg.value.

wrap

Wrap a DbgRecord pointer as an opaque LLVMDbgRecordRef.

at::getAssignmentInsts

Return instructions that perform the assignment encoded by DVR.

at::getDVRAssignmentMarkers

Return a range of dbg_assign records for which Inst performs the assignment they encode.

Created with MrDocs