LLVM 19.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::DebugValueUser Class Reference

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

#include "llvm/IR/Metadata.h"

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

Public Member Functions

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 Member Functions

ArrayRef< Metadata * > getDebugValues () const
 

Protected Attributes

std::array< Metadata *, 3 > DebugValues
 

Detailed Description

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

Currently only inherited by DbgVariableRecord; if other classes need to use it, then a SubclassID will need to be added (either as a new field or by making DebugValue into a PointerIntUnion) to discriminate between the subclasses in lookup and callback handling.

Definition at line 212 of file Metadata.h.

Constructor & Destructor Documentation

◆ DebugValueUser() [1/4]

llvm::DebugValueUser::DebugValueUser ( )
default

◆ DebugValueUser() [2/4]

llvm::DebugValueUser::DebugValueUser ( std::array< Metadata *, 3 >  DebugValues)
inlineexplicit

Definition at line 233 of file Metadata.h.

◆ DebugValueUser() [3/4]

llvm::DebugValueUser::DebugValueUser ( DebugValueUser &&  X)
inline

Definition at line 237 of file Metadata.h.

References DebugValues, and X.

◆ DebugValueUser() [4/4]

llvm::DebugValueUser::DebugValueUser ( const DebugValueUser X)
inline

Definition at line 241 of file Metadata.h.

References DebugValues, and X.

◆ ~DebugValueUser()

llvm::DebugValueUser::~DebugValueUser ( )
inline

Definition at line 266 of file Metadata.h.

Member Function Documentation

◆ getDebugValues()

ArrayRef< Metadata * > llvm::DebugValueUser::getDebugValues ( ) const
inlineprotected

Definition at line 220 of file Metadata.h.

References DebugValues.

◆ getUser() [1/2]

DbgVariableRecord * DebugValueUser::getUser ( )

◆ getUser() [2/2]

const DbgVariableRecord * DebugValueUser::getUser ( ) const

Definition at line 154 of file Metadata.cpp.

◆ handleChangedValue()

void DebugValueUser::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.

For manually replacing elements of DebugValues, resetDebugValue(Idx, NewDebugValue) should be used instead.

Definition at line 158 of file Metadata.cpp.

References DebugValues, llvm::PoisonValue::get(), llvm::ValueAsMetadata::get(), Idx, and resetDebugValue().

◆ operator!=()

bool llvm::DebugValueUser::operator!= ( const DebugValueUser X) const
inline

Definition at line 283 of file Metadata.h.

References DebugValues, and X.

◆ operator=() [1/2]

DebugValueUser & llvm::DebugValueUser::operator= ( const DebugValueUser X)
inline

Definition at line 256 of file Metadata.h.

References DebugValues, and X.

◆ operator=() [2/2]

DebugValueUser & llvm::DebugValueUser::operator= ( DebugValueUser &&  X)
inline

Definition at line 246 of file Metadata.h.

References DebugValues, and X.

◆ operator==()

bool llvm::DebugValueUser::operator== ( const DebugValueUser X) const
inline

Definition at line 280 of file Metadata.h.

References DebugValues, and X.

◆ resetDebugValue()

void llvm::DebugValueUser::resetDebugValue ( size_t  Idx,
Metadata DebugValue 
)
inline

◆ resetDebugValues()

void llvm::DebugValueUser::resetDebugValues ( )
inline

Definition at line 268 of file Metadata.h.

References DebugValues.

Member Data Documentation

◆ DebugValues

std::array<Metadata *, 3> llvm::DebugValueUser::DebugValues
protected

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