LLVM 22.0.0git
llvm::WeakTrackingVH Class Reference

Value handle that is nullable, but tries to track the Value. More...

#include "llvm/IR/ValueHandle.h"

Inheritance diagram for llvm::WeakTrackingVH:
[legend]

Public Member Functions

 WeakTrackingVH ()
 WeakTrackingVH (Value *P)
 WeakTrackingVH (const WeakTrackingVH &RHS)
WeakTrackingVHoperator= (const WeakTrackingVH &RHS)=default
Valueoperator= (Value *RHS)
Valueoperator= (const ValueHandleBase &RHS)
 operator Value * () const
bool pointsToAliveValue () const
Public Member Functions inherited from llvm::ValueHandleBase
 ValueHandleBase (HandleBaseKind Kind)
 ValueHandleBase (HandleBaseKind Kind, Value *V)
 ~ValueHandleBase ()
Valueoperator= (Value *RHS)
Valueoperator= (const ValueHandleBase &RHS)
Valueoperator-> () const
Valueoperator* () const

Additional Inherited Members

Static Public Member Functions inherited from llvm::ValueHandleBase
static LLVM_ABI void ValueIsDeleted (Value *V)
static LLVM_ABI void ValueIsRAUWd (Value *Old, Value *New)
Protected Types inherited from llvm::ValueHandleBase
enum  HandleBaseKind { Assert , Callback , Weak , WeakTracking }
 This indicates what sub class the handle actually is. More...
Protected Member Functions inherited from llvm::ValueHandleBase
 ValueHandleBase (const ValueHandleBase &RHS)
 ValueHandleBase (HandleBaseKind Kind, const ValueHandleBase &RHS)
ValuegetValPtr () const
LLVM_ABI void RemoveFromUseList ()
 Remove this ValueHandle from its current use list.
void clearValPtr ()
 Clear the underlying pointer without clearing the use list.
Static Protected Member Functions inherited from llvm::ValueHandleBase
static bool isValid (Value *V)

Detailed Description

Value handle that is nullable, but tries to track the Value.

This is a value handle that tries hard to point to a Value, even across RAUW operations, but will null itself out if the value is destroyed. this is useful for advisory sorts of information, but should not be used as the key of a map (since the map would have to rearrange itself when the pointer changes).

Definition at line 205 of file ValueHandle.h.

Constructor & Destructor Documentation

◆ WeakTrackingVH() [1/3]

llvm::WeakTrackingVH::WeakTrackingVH ( )
inline

◆ WeakTrackingVH() [2/3]

llvm::WeakTrackingVH::WeakTrackingVH ( Value * P)
inline

◆ WeakTrackingVH() [3/3]

llvm::WeakTrackingVH::WeakTrackingVH ( const WeakTrackingVH & RHS)
inline

Member Function Documentation

◆ operator Value *()

llvm::WeakTrackingVH::operator Value * ( ) const
inline

◆ operator=() [1/3]

Value * llvm::WeakTrackingVH::operator= ( const ValueHandleBase & RHS)
inline

◆ operator=() [2/3]

WeakTrackingVH & llvm::WeakTrackingVH::operator= ( const WeakTrackingVH & RHS)
default

References RHS, and WeakTrackingVH().

◆ operator=() [3/3]

Value * llvm::WeakTrackingVH::operator= ( Value * RHS)
inline

◆ pointsToAliveValue()

bool llvm::WeakTrackingVH::pointsToAliveValue ( ) const
inline

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