LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
llvm::DbgVariableRecord Class Reference

Record of a variable value-assignment, aka a non instruction representation of the dbg.value intrinsic. More...

#include "llvm/IR/DebugProgramInstruction.h"

Inheritance diagram for llvm::DbgVariableRecord:
Inheritance graph
[legend]

Classes

class  location_op_iterator
 Iterator for ValueAsMetadata that internally uses direct pointer iteration over either a ValueAsMetadata* or a ValueAsMetadata**, dereferencing to the ValueAsMetadata . More...
 

Public Types

enum class  LocationType : uint8_t {
  Declare , Value , Assign , End ,
  Any
}
 
- Public Types inherited from llvm::DbgRecord
enum  Kind : uint8_t { ValueKind , LabelKind }
 Subclass discriminator. More...
 
using self_iterator = simple_ilist< DbgRecord >::iterator
 
using const_self_iterator = simple_ilist< DbgRecord >::const_iterator
 

Public Member Functions

 DbgVariableRecord (const DbgVariableIntrinsic *DVI)
 Create a new DbgVariableRecord representing the intrinsic DVI, for example the assignment represented by a dbg.value.
 
 DbgVariableRecord (const DbgVariableRecord &DVR)
 
 DbgVariableRecord (Metadata *Location, DILocalVariable *DV, DIExpression *Expr, const DILocation *DI, LocationType Type=LocationType::Value)
 Directly construct a new DbgVariableRecord representing a dbg.value intrinsic assigning Location to the DV / Expr / DI variable.
 
 DbgVariableRecord (Metadata *Value, DILocalVariable *Variable, DIExpression *Expression, DIAssignID *AssignID, Metadata *Address, DIExpression *AddressExpression, const DILocation *DI)
 
bool isDbgDeclare ()
 
bool isDbgValue ()
 
iterator_range< location_op_iteratorlocation_ops () const
 Get the locations corresponding to the variable referenced by the debug info intrinsic.
 
ValuegetVariableLocationOp (unsigned OpIdx) const
 
void replaceVariableLocationOp (Value *OldValue, Value *NewValue, bool AllowEmpty=false)
 
void replaceVariableLocationOp (unsigned OpIdx, Value *NewValue)
 
void addVariableLocationOps (ArrayRef< Value * > NewValues, DIExpression *NewExpr)
 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.
 
unsigned getNumVariableLocationOps () const
 
bool hasArgList () const
 
bool hasValidLocation () const
 Returns true if this DbgVariableRecord has no empty MDNodes in its location list.
 
bool isAddressOfVariable () const
 Does this describe the address of a local variable.
 
bool isValueOfVariable () const
 Determine if this describes the value of a local variable.
 
LocationType getType () const
 
void setKillLocation ()
 
bool isKillLocation () const
 
void setVariable (DILocalVariable *NewVar)
 
DILocalVariablegetVariable () const
 
MDNodegetRawVariable () const
 
void setExpression (DIExpression *NewExpr)
 
DIExpressiongetExpression () const
 
MDNodegetRawExpression () const
 
MetadatagetRawLocation () const
 Returns the metadata operand for the first location description.
 
ValuegetValue (unsigned OpIdx=0) const
 
void setRawLocation (Metadata *NewLocation)
 Use of this should generally be avoided; instead, replaceVariableLocationOp and addVariableLocationOps should be used where possible to avoid creating invalid state.
 
std::optional< DbgVariableFragmentInfogetFragment () const
 
DbgVariableFragmentInfo getFragmentOrEntireVariable () const
 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.
 
std::optional< uint64_tgetFragmentSizeInBits () const
 Get the size (in bits) of the variable, or fragment of the variable that is described.
 
bool isEquivalentTo (const DbgVariableRecord &Other) const
 
bool isIdenticalToWhenDefined (const DbgVariableRecord &Other) const
 
DbgVariableRecordclone () const
 
DbgVariableIntrinsiccreateDebugIntrinsic (Module *M, Instruction *InsertBefore) const
 Convert this DbgVariableRecord back into a dbg.value intrinsic.
 
void handleChangedLocation (Metadata *NewLocation)
 Handle changes to the location of the Value(s) that we refer to happening "under our feet".
 
void print (raw_ostream &O, bool IsForDebug=false) const
 
void print (raw_ostream &ROS, ModuleSlotTracker &MST, bool IsForDebug) const
 
DbgAssign Methods
bool isDbgAssign () const
 
ValuegetAddress () const
 
MetadatagetRawAddress () const
 
MetadatagetRawAssignID () const
 
DIAssignIDgetAssignID () const
 
DIExpressiongetAddressExpression () const
 
MDNodegetRawAddressExpression () const
 
void setAddressExpression (DIExpression *NewExpr)
 
void setAssignId (DIAssignID *New)
 
void setAddress (Value *V)
 
void setKillAddress ()
 Kill the address component.
 
bool isKillAddress () const
 Check whether this kills the address component.
 
- Public Member Functions inherited from llvm::DbgRecord
 DbgRecord (Kind RecordKind, DebugLoc DL)
 
bool isEquivalentTo (const DbgRecord &R) const
 Same as isIdenticalToWhenDefined but checks DebugLoc too.
 
Kind getRecordKind () const
 
void setMarker (DbgMarker *M)
 
DbgMarkergetMarker ()
 
const DbgMarkergetMarker () const
 
BasicBlockgetBlock ()
 
const BasicBlockgetBlock () const
 
FunctiongetFunction ()
 
const FunctiongetFunction () const
 
ModulegetModule ()
 
const ModulegetModule () const
 
LLVMContextgetContext ()
 
const LLVMContextgetContext () const
 
const InstructiongetInstruction () const
 
const BasicBlockgetParent () const
 
BasicBlockgetParent ()
 
void removeFromParent ()
 
void eraseFromParent ()
 
DbgRecordgetNextNode ()
 
DbgRecordgetPrevNode ()
 
void insertBefore (DbgRecord *InsertBefore)
 
void insertAfter (DbgRecord *InsertAfter)
 
void moveBefore (DbgRecord *MoveBefore)
 
void moveAfter (DbgRecord *MoveAfter)
 
DebugLoc getDebugLoc () const
 
void setDebugLoc (DebugLoc Loc)
 
void dump () const
 
void deleteRecord ()
 Methods that dispatch to subclass implementations.
 
DbgRecordclone () const
 
void print (raw_ostream &O, bool IsForDebug=false) const
 
void print (raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug) const
 
bool isIdenticalToWhenDefined (const DbgRecord &R) const
 
DbgInfoIntrinsiccreateDebugIntrinsic (Module *M, Instruction *InsertBefore) const
 Convert this DbgRecord back into an appropriate llvm.dbg.
 
- Public Member Functions inherited from llvm::ilist_node_impl< OptionsT >
self_iterator getIterator ()
 
const_self_iterator getIterator () const
 
reverse_self_iterator getReverseIterator ()
 
const_reverse_self_iterator getReverseIterator () const
 
bool isSentinel () const
 Check whether this is the sentinel node.
 
- Public Member Functions inherited from llvm::ilist_detail::node_parent_access< ilist_node_impl< OptionsT >, OptionsT::parent_ty >
const OptionsT::parent_ty * getParent () const
 
OptionsT::parent_ty * getParent ()
 
void setParent (OptionsT::parent_ty *Parent)
 

Static Public Member Functions

static DbgVariableRecordcreateUnresolvedDbgVariableRecord (LocationType Type, Metadata *Val, MDNode *Variable, MDNode *Expression, MDNode *AssignID, Metadata *Address, MDNode *AddressExpression, MDNode *DI)
 Used to create DbgVariableRecords during parsing, where some metadata references may still be unresolved.
 
static DbgVariableRecordcreateDVRAssign (Value *Val, DILocalVariable *Variable, DIExpression *Expression, DIAssignID *AssignID, Value *Address, DIExpression *AddressExpression, const DILocation *DI)
 
static DbgVariableRecordcreateLinkedDVRAssign (Instruction *LinkedInstr, Value *Val, DILocalVariable *Variable, DIExpression *Expression, Value *Address, DIExpression *AddressExpression, const DILocation *DI)
 
static DbgVariableRecordcreateDbgVariableRecord (Value *Location, DILocalVariable *DV, DIExpression *Expr, const DILocation *DI)
 
static DbgVariableRecordcreateDbgVariableRecord (Value *Location, DILocalVariable *DV, DIExpression *Expr, const DILocation *DI, DbgVariableRecord &InsertBefore)
 
static DbgVariableRecordcreateDVRDeclare (Value *Address, DILocalVariable *DV, DIExpression *Expr, const DILocation *DI)
 
static DbgVariableRecordcreateDVRDeclare (Value *Address, DILocalVariable *DV, DIExpression *Expr, const DILocation *DI, DbgVariableRecord &InsertBefore)
 
static bool classof (const DbgRecord *E)
 Support type inquiry through isa, cast, and dyn_cast.
 

Public Attributes

LocationType Type
 Classification of the debug-info record that this DbgVariableRecord represents.
 
DbgRecordParamRef< DILocalVariableVariable
 
DbgRecordParamRef< DIExpressionExpression
 
DbgRecordParamRef< DIExpressionAddressExpression
 
- Public Attributes inherited from llvm::DbgRecord
DbgMarkerMarker = nullptr
 Marker that this DbgRecord is linked into.
 

Friends

class DebugValueUser
 

Additional Inherited Members

- Protected Types inherited from llvm::ilist_node_impl< OptionsT >
using self_iterator = typename ilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, false, false >::type
 
using const_self_iterator = typename ilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, false, true >::type
 
using reverse_self_iterator = typename ilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, true, false >::type
 
using const_reverse_self_iterator = typename ilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, true, true >::type
 
- Protected Member Functions inherited from llvm::DbgRecord
 ~DbgRecord ()=default
 Similarly to Value, we avoid paying the cost of a vtable by protecting the dtor and having deleteRecord dispatch cleanup.
 
- Protected Member Functions inherited from llvm::ilist_node_impl< OptionsT >
 ilist_node_impl ()=default
 
- Protected Member Functions inherited from llvm::DebugValueUser
ArrayRef< Metadata * > getDebugValues () const
 
DbgVariableRecordgetUser ()
 
const DbgVariableRecordgetUser () const
 
void handleChangedValue (void *Old, Metadata *NewDebugValue)
 To be called by ReplaceableMetadataImpl::replaceAllUsesWith, where Old is a pointer to one of the pointers in DebugValues (so should be type Metadata**), and NewDebugValue is the new Metadata* that is replacing *Old.
 
 DebugValueUser ()=default
 
 DebugValueUser (std::array< Metadata *, 3 > DebugValues)
 
 DebugValueUser (DebugValueUser &&X)
 
 DebugValueUser (const DebugValueUser &X)
 
DebugValueUseroperator= (DebugValueUser &&X)
 
DebugValueUseroperator= (const DebugValueUser &X)
 
 ~DebugValueUser ()
 
void resetDebugValues ()
 
void resetDebugValue (size_t Idx, Metadata *DebugValue)
 
bool operator== (const DebugValueUser &X) const
 
bool operator!= (const DebugValueUser &X) const
 
- Protected Attributes inherited from llvm::DbgRecord
DebugLoc DbgLoc
 
Kind RecordKind
 Subclass discriminator.
 
- Protected Attributes inherited from llvm::DebugValueUser
std::array< Metadata *, 3 > DebugValues
 

Detailed Description

Record of a variable value-assignment, aka a non instruction representation of the dbg.value intrinsic.

This class inherits from DebugValueUser to allow LLVM's metadata facilities to update our references to metadata beneath our feet.

Definition at line 262 of file DebugProgramInstruction.h.

Member Enumeration Documentation

◆ LocationType

enum class llvm::DbgVariableRecord::LocationType : uint8_t
strong
Enumerator
Declare 
Value 
Assign 
End 

Marks the end of the concrete types.

Any 

To indicate all LocationTypes in searches.

Definition at line 266 of file DebugProgramInstruction.h.

Constructor & Destructor Documentation

◆ DbgVariableRecord() [1/4]

llvm::DbgVariableRecord::DbgVariableRecord ( const DbgVariableIntrinsic DVI)

Create a new DbgVariableRecord representing the intrinsic DVI, for example the assignment represented by a dbg.value.

Definition at line 31 of file DebugProgramInstruction.cpp.

References llvm::DbgVariableIntrinsic::getRawLocation().

◆ DbgVariableRecord() [2/4]

llvm::DbgVariableRecord::DbgVariableRecord ( const DbgVariableRecord DVR)

Definition at line 58 of file DebugProgramInstruction.cpp.

◆ DbgVariableRecord() [3/4]

llvm::DbgVariableRecord::DbgVariableRecord ( Metadata Location,
DILocalVariable DV,
DIExpression Expr,
const DILocation DI,
LocationType  Type = LocationType::Value 
)

Directly construct a new DbgVariableRecord representing a dbg.value intrinsic assigning Location to the DV / Expr / DI variable.

Definition at line 64 of file DebugProgramInstruction.cpp.

◆ DbgVariableRecord() [4/4]

llvm::DbgVariableRecord::DbgVariableRecord ( Metadata Value,
DILocalVariable Variable,
DIExpression Expression,
DIAssignID AssignID,
Metadata Address,
DIExpression AddressExpression,
const DILocation DI 
)

Definition at line 70 of file DebugProgramInstruction.cpp.

References llvm::Address, and Value.

Member Function Documentation

◆ addVariableLocationOps()

void llvm::DbgVariableRecord::addVariableLocationOps ( ArrayRef< Value * >  NewValues,
DIExpression NewExpr 
)

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.

Definition at line 340 of file DebugProgramInstruction.cpp.

References assert(), llvm::DIArgList::get(), llvm::getAsMetadata(), llvm::DbgRecord::getContext(), getNumVariableLocationOps(), getVariableLocationOp(), llvm::is_contained(), location_ops(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), setExpression(), setRawLocation(), and llvm::ArrayRef< T >::size().

◆ classof()

static bool llvm::DbgVariableRecord::classof ( const DbgRecord E)
inlinestatic

Support type inquiry through isa, cast, and dyn_cast.

Definition at line 540 of file DebugProgramInstruction.h.

References E, and llvm::DbgRecord::ValueKind.

◆ clone()

DbgVariableRecord * llvm::DbgVariableRecord::clone ( ) const

Definition at line 394 of file DebugProgramInstruction.cpp.

Referenced by insertDbgVariableRecordsForPHIs().

◆ createDbgVariableRecord() [1/2]

DbgVariableRecord * llvm::DbgVariableRecord::createDbgVariableRecord ( Value Location,
DILocalVariable DV,
DIExpression Expr,
const DILocation DI 
)
static

Definition at line 179 of file DebugProgramInstruction.cpp.

References llvm::ValueAsMetadata::get(), and Value.

Referenced by createDbgVariableRecord(), and insertNewDbgInst().

◆ createDbgVariableRecord() [2/2]

DbgVariableRecord * llvm::DbgVariableRecord::createDbgVariableRecord ( Value Location,
DILocalVariable DV,
DIExpression Expr,
const DILocation DI,
DbgVariableRecord InsertBefore 
)
static

Definition at line 186 of file DebugProgramInstruction.cpp.

References createDbgVariableRecord().

◆ createDebugIntrinsic()

DbgVariableIntrinsic * llvm::DbgVariableRecord::createDebugIntrinsic ( Module M,
Instruction InsertBefore 
) const

◆ createDVRAssign()

DbgVariableRecord * llvm::DbgVariableRecord::createDVRAssign ( Value Val,
DILocalVariable Variable,
DIExpression Expression,
DIAssignID AssignID,
Value Address,
DIExpression AddressExpression,
const DILocation DI 
)
static

◆ createDVRDeclare() [1/2]

DbgVariableRecord * llvm::DbgVariableRecord::createDVRDeclare ( Value Address,
DILocalVariable DV,
DIExpression Expr,
const DILocation DI 
)
static

◆ createDVRDeclare() [2/2]

DbgVariableRecord * llvm::DbgVariableRecord::createDVRDeclare ( Value Address,
DILocalVariable DV,
DIExpression Expr,
const DILocation DI,
DbgVariableRecord InsertBefore 
)
static

Definition at line 203 of file DebugProgramInstruction.cpp.

References llvm::Address, and createDVRDeclare().

◆ createLinkedDVRAssign()

DbgVariableRecord * llvm::DbgVariableRecord::createLinkedDVRAssign ( Instruction LinkedInstr,
Value Val,
DILocalVariable Variable,
DIExpression Expression,
Value Address,
DIExpression AddressExpression,
const DILocation DI 
)
static

◆ createUnresolvedDbgVariableRecord()

DbgVariableRecord * llvm::DbgVariableRecord::createUnresolvedDbgVariableRecord ( DbgVariableRecord::LocationType  Type,
Metadata Val,
MDNode Variable,
MDNode Expression,
MDNode AssignID,
Metadata Address,
MDNode AddressExpression,
MDNode DI 
)
static

Used to create DbgVariableRecords during parsing, where some metadata references may still be unresolved.

Although for some fields a generic Metadata* argument is accepted for forward type-references, the verifier and accessors will reject incorrect types later on. The function is used for all types of DbgVariableRecords for simplicity while parsing, but asserts if any necessary fields are empty or unused fields are not empty, i.e. if the #dbg_assign fields are used for a non-dbg-assign type.

Definition at line 170 of file DebugProgramInstruction.cpp.

References llvm::Address, AddressExpression, and Variable.

◆ getAddress()

Value * llvm::DbgVariableRecord::getAddress ( ) const

◆ getAddressExpression()

DIExpression * llvm::DbgVariableRecord::getAddressExpression ( ) const
inline

◆ getAssignID()

DIAssignID * llvm::DbgVariableRecord::getAssignID ( ) const

◆ getExpression()

DIExpression * llvm::DbgVariableRecord::getExpression ( ) const
inline

◆ getFragment()

std::optional< DbgVariableFragmentInfo > llvm::DbgVariableRecord::getFragment ( ) const

◆ getFragmentOrEntireVariable()

DbgVariableFragmentInfo llvm::DbgVariableRecord::getFragmentOrEntireVariable ( ) const
inline

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.

Definition at line 473 of file DebugProgramInstruction.h.

References getFragment(), and getFragmentSizeInBits().

◆ getFragmentSizeInBits()

std::optional< uint64_t > llvm::DbgVariableRecord::getFragmentSizeInBits ( ) const

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

Definition at line 378 of file DebugProgramInstruction.cpp.

References getExpression(), llvm::DIVariable::getSizeInBits(), and getVariable().

Referenced by getFragmentOrEntireVariable().

◆ getNumVariableLocationOps()

unsigned llvm::DbgVariableRecord::getNumVariableLocationOps ( ) const

◆ getRawAddress()

Metadata * llvm::DbgVariableRecord::getRawAddress ( ) const
inline

◆ getRawAddressExpression()

MDNode * llvm::DbgVariableRecord::getRawAddressExpression ( ) const
inline

Definition at line 507 of file DebugProgramInstruction.h.

References AddressExpression.

◆ getRawAssignID()

Metadata * llvm::DbgVariableRecord::getRawAssignID ( ) const
inline

Definition at line 504 of file DebugProgramInstruction.h.

References llvm::DebugValueUser::DebugValues.

◆ getRawExpression()

MDNode * llvm::DbgVariableRecord::getRawExpression ( ) const
inline

Definition at line 446 of file DebugProgramInstruction.h.

◆ getRawLocation()

Metadata * llvm::DbgVariableRecord::getRawLocation ( ) const
inline

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.

Definition at line 452 of file DebugProgramInstruction.h.

References llvm::DebugValueUser::DebugValues.

Referenced by buildOverlapMapAndRecordDeclares(), createDebugIntrinsic(), getNumVariableLocationOps(), getVariableLocationOp(), hasArgList(), isKillLocation(), location_ops(), and llvm::ValueEnumerator::ValueEnumerator().

◆ getRawVariable()

MDNode * llvm::DbgVariableRecord::getRawVariable ( ) const
inline

Definition at line 442 of file DebugProgramInstruction.h.

References Variable.

◆ getType()

LocationType llvm::DbgVariableRecord::getType ( ) const
inline

◆ getValue()

Value * llvm::DbgVariableRecord::getValue ( unsigned  OpIdx = 0) const
inline

Definition at line 454 of file DebugProgramInstruction.h.

References getVariableLocationOp().

Referenced by insertNewDbgInst().

◆ getVariable()

DILocalVariable * llvm::DbgVariableRecord::getVariable ( ) const
inline

◆ getVariableLocationOp()

Value * llvm::DbgVariableRecord::getVariableLocationOp ( unsigned  OpIdx) const

◆ handleChangedLocation()

void llvm::DbgVariableRecord::handleChangedLocation ( Metadata NewLocation)

Handle changes to the location of the Value(s) that we refer to happening "under our feet".

◆ hasArgList()

bool llvm::DbgVariableRecord::hasArgList ( ) const
inline

◆ hasValidLocation()

bool llvm::DbgVariableRecord::hasValidLocation ( ) const
inline

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

Definition at line 425 of file DebugProgramInstruction.h.

References getVariableLocationOp().

◆ isAddressOfVariable()

bool llvm::DbgVariableRecord::isAddressOfVariable ( ) const
inline

Does this describe the address of a local variable.

True for dbg.addr and dbg.declare, but not dbg.value, which describes its value.

Definition at line 429 of file DebugProgramInstruction.h.

References Declare.

Referenced by llvm::ConvertDebugDeclareToDebugValue(), and valueCoversEntireFragment().

◆ isDbgAssign()

bool llvm::DbgVariableRecord::isDbgAssign ( ) const
inline

◆ isDbgDeclare()

bool llvm::DbgVariableRecord::isDbgDeclare ( )
inline

◆ isDbgValue()

bool llvm::DbgVariableRecord::isDbgValue ( )
inline

Definition at line 402 of file DebugProgramInstruction.h.

References Value.

Referenced by insertNewDbgInst().

◆ isEquivalentTo()

bool llvm::DbgVariableRecord::isEquivalentTo ( const DbgVariableRecord Other) const
inline

◆ isIdenticalToWhenDefined()

bool llvm::DbgVariableRecord::isIdenticalToWhenDefined ( const DbgVariableRecord Other) const
inline

◆ isKillAddress()

bool llvm::DbgVariableRecord::isKillAddress ( ) const

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 guarentee the address is a valid location for the variable at the intrinsic's position in IR.

Definition at line 497 of file DebugProgramInstruction.cpp.

References Addr, and getAddress().

Referenced by isKillAddress().

◆ isKillLocation()

bool llvm::DbgVariableRecord::isKillLocation ( ) const

◆ isValueOfVariable()

bool llvm::DbgVariableRecord::isValueOfVariable ( ) const
inline

Determine if this describes the value of a local variable.

It is false for dbg.declare, but true for dbg.value, which describes its value.

Definition at line 433 of file DebugProgramInstruction.h.

References Value.

◆ location_ops()

iterator_range< DbgVariableRecord::location_op_iterator > llvm::DbgVariableRecord::location_ops ( ) const

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.

Definition at line 234 of file DebugProgramInstruction.cpp.

References assert(), and getRawLocation().

Referenced by addVariableLocationOps(), fixupDebugInfoPostExtraction(), insertDbgVariableRecordsForPHIs(), isKillLocation(), replaceVariableLocationOp(), setKillLocation(), and llvm::SelectionDAGBuilder::visitDbgInfo().

◆ print() [1/2]

void DbgVariableRecord::print ( raw_ostream O,
bool  IsForDebug = false 
) const

Definition at line 4963 of file AsmWriter.cpp.

References getModuleFromDPI(), and print().

Referenced by print().

◆ print() [2/2]

void DbgVariableRecord::print ( raw_ostream ROS,
ModuleSlotTracker MST,
bool  IsForDebug 
) const

◆ replaceVariableLocationOp() [1/2]

void llvm::DbgVariableRecord::replaceVariableLocationOp ( unsigned  OpIdx,
Value NewValue 
)

◆ replaceVariableLocationOp() [2/2]

void llvm::DbgVariableRecord::replaceVariableLocationOp ( Value OldValue,
Value NewValue,
bool  AllowEmpty = false 
)

◆ setAddress()

void llvm::DbgVariableRecord::setAddress ( Value V)
inline

◆ setAddressExpression()

void llvm::DbgVariableRecord::setAddressExpression ( DIExpression NewExpr)
inline

Definition at line 510 of file DebugProgramInstruction.h.

References AddressExpression.

◆ setAssignId()

void llvm::DbgVariableRecord::setAssignId ( DIAssignID New)

◆ setExpression()

void llvm::DbgVariableRecord::setExpression ( DIExpression NewExpr)
inline

◆ setKillAddress()

void llvm::DbgVariableRecord::setKillAddress ( )

◆ setKillLocation()

void llvm::DbgVariableRecord::setKillLocation ( )

◆ setRawLocation()

void llvm::DbgVariableRecord::setRawLocation ( Metadata NewLocation)
inline

Use of this should generally be avoided; instead, replaceVariableLocationOp and addVariableLocationOps should be used where possible to avoid creating invalid state.

Definition at line 461 of file DebugProgramInstruction.h.

References assert(), and llvm::DebugValueUser::resetDebugValue().

Referenced by addVariableLocationOps(), and replaceVariableLocationOp().

◆ setVariable()

void llvm::DbgVariableRecord::setVariable ( DILocalVariable NewVar)
inline

Definition at line 440 of file DebugProgramInstruction.h.

References Variable.

Referenced by fixupDebugInfoPostExtraction().

Friends And Related Function Documentation

◆ DebugValueUser

friend class DebugValueUser
friend

Definition at line 263 of file DebugProgramInstruction.h.

Member Data Documentation

◆ AddressExpression

DbgRecordParamRef<DIExpression> llvm::DbgVariableRecord::AddressExpression

◆ Expression

DbgRecordParamRef<DIExpression> llvm::DbgVariableRecord::Expression

Definition at line 285 of file DebugProgramInstruction.h.

◆ Type

LocationType llvm::DbgVariableRecord::Type

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.

Definition at line 278 of file DebugProgramInstruction.h.

Referenced by getType().

◆ Variable

DbgRecordParamRef<DILocalVariable> llvm::DbgVariableRecord::Variable

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