LLVM 23.0.0git
llvm::ValueHandleBase Class Reference

This is the common base class of value handles. More...

#include "llvm/IR/ValueHandle.h"

Inheritance diagram for llvm::ValueHandleBase:
[legend]

Public Member Functions

 ValueHandleBase (HandleBaseKind Kind)
 ValueHandleBase (HandleBaseKind Kind, Value *V)
 ~ValueHandleBase ()
Valueoperator= (Value *RHS)
Valueoperator= (const ValueHandleBase &RHS)
Valueoperator= (ValueHandleBase &&RHS)
Valueoperator-> () const
Valueoperator* () const

Static Public Member Functions

static LLVM_ABI void ValueIsDeleted (Value *V)
static LLVM_ABI void ValueIsRAUWd (Value *Old, Value *New)

Protected Types

enum  HandleBaseKind { Assert , Callback , Weak , WeakTracking }
 This indicates what sub class the handle actually is. More...

Protected Member Functions

 ValueHandleBase (const ValueHandleBase &RHS)
 ValueHandleBase (HandleBaseKind Kind, const ValueHandleBase &RHS)
 ValueHandleBase (HandleBaseKind Kind, 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

static bool isValid (Value *V)

Friends

class Value

Detailed Description

This is the common base class of value handles.

ValueHandle's are smart pointers to Value's that have special behavior when the value is deleted or ReplaceAllUsesWith'd. See the specific handles below for details.

Definition at line 30 of file ValueHandle.h.

Member Enumeration Documentation

◆ HandleBaseKind

This indicates what sub class the handle actually is.

This is to avoid having a vtable for the light-weight handle pointers. The fully general Callback version does have a vtable.

Enumerator
Assert 
Callback 
Weak 
WeakTracking 

Definition at line 38 of file ValueHandle.h.

Constructor & Destructor Documentation

◆ ValueHandleBase() [1/5]

◆ ValueHandleBase() [2/5]

llvm::ValueHandleBase::ValueHandleBase ( HandleBaseKind Kind,
const ValueHandleBase & RHS )
inlineprotected

Definition at line 43 of file ValueHandle.h.

References getValPtr(), isValid(), RHS, and ValueHandleBase().

◆ ValueHandleBase() [3/5]

llvm::ValueHandleBase::ValueHandleBase ( HandleBaseKind Kind,
ValueHandleBase && RHS )
inlineprotected

Definition at line 49 of file ValueHandle.h.

References getValPtr(), isValid(), RHS, and ValueHandleBase().

◆ ValueHandleBase() [4/5]

llvm::ValueHandleBase::ValueHandleBase ( HandleBaseKind Kind)
inlineexplicit

Definition at line 66 of file ValueHandle.h.

◆ ValueHandleBase() [5/5]

llvm::ValueHandleBase::ValueHandleBase ( HandleBaseKind Kind,
Value * V )
inline

Definition at line 68 of file ValueHandle.h.

References getValPtr(), isValid(), and Value.

◆ ~ValueHandleBase()

llvm::ValueHandleBase::~ValueHandleBase ( )
inline

Definition at line 74 of file ValueHandle.h.

References getValPtr(), isValid(), and RemoveFromUseList().

Member Function Documentation

◆ clearValPtr()

void llvm::ValueHandleBase::clearValPtr ( )
inlineprotected

Clear the underlying pointer without clearing the use list.

This should only be used if a derived class has manually removed the handle from the use list.

Definition at line 144 of file ValueHandle.h.

◆ getValPtr()

◆ isValid()

bool llvm::ValueHandleBase::isValid ( Value * V)
inlinestaticprotected

◆ operator*()

Value & llvm::ValueHandleBase::operator* ( ) const
inline

Definition at line 122 of file ValueHandle.h.

References assert(), getValPtr(), and Value.

◆ operator->()

Value * llvm::ValueHandleBase::operator-> ( ) const
inline

Definition at line 121 of file ValueHandle.h.

References getValPtr(), and Value.

◆ operator=() [1/3]

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

Definition at line 90 of file ValueHandle.h.

References getValPtr(), isValid(), RemoveFromUseList(), RHS, Value, and ValueHandleBase().

◆ operator=() [2/3]

◆ operator=() [3/3]

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

Definition at line 101 of file ValueHandle.h.

References getValPtr(), isValid(), RemoveFromUseList(), RHS, Value, and ValueHandleBase().

◆ RemoveFromUseList()

void ValueHandleBase::RemoveFromUseList ( )
protected

Remove this ValueHandle from its current use list.

Definition at line 1206 of file Value.cpp.

Referenced by operator=(), operator=(), operator=(), and ~ValueHandleBase().

◆ ValueIsDeleted()

void ValueHandleBase::ValueIsDeleted ( Value * V)
static

Definition at line 1232 of file Value.cpp.

◆ ValueIsRAUWd()

void ValueHandleBase::ValueIsRAUWd ( Value * Old,
Value * New )
static

◆ Value


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