LLVM  8.0.1
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
llvm::ValueHandleBase Class Reference

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

#include "llvm/IR/ValueHandle.h"

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

Public Member Functions

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

Static Public Member Functions

static void ValueIsDeleted (Value *V)
 
static 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)
 
ValuegetValPtr () const
 
void RemoveFromUseList ()
 Remove this ValueHandle from its current use list. More...
 
void clearValPtr ()
 Clear the underlying pointer without clearing the use list. More...
 

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/4]

llvm::ValueHandleBase::ValueHandleBase ( const ValueHandleBase RHS)
inlineprotected

Definition at line 40 of file ValueHandle.h.

◆ ValueHandleBase() [2/4]

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

Definition at line 43 of file ValueHandle.h.

References getValPtr(), and isValid().

◆ ValueHandleBase() [3/4]

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

Definition at line 57 of file ValueHandle.h.

◆ ValueHandleBase() [4/4]

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

Definition at line 59 of file ValueHandle.h.

References getValPtr(), and isValid().

◆ ~ValueHandleBase()

llvm::ValueHandleBase::~ValueHandleBase ( )
inline

Definition at line 65 of file ValueHandle.h.

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

Member Function Documentation

◆ clearValPtr()

void llvm::ValueHandleBase::clearValPtr ( )
inlineprotected

◆ getValPtr()

Value* llvm::ValueHandleBase::getValPtr ( ) const
inlineprotected

◆ isValid()

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

◆ operator*()

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

Definition at line 93 of file ValueHandle.h.

References getValPtr().

◆ operator->()

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

Definition at line 92 of file ValueHandle.h.

References getValPtr().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 81 of file ValueHandle.h.

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

◆ RemoveFromUseList()

void ValueHandleBase::RemoveFromUseList ( )
protected

◆ ValueIsDeleted()

void ValueHandleBase::ValueIsDeleted ( Value V)
static

◆ ValueIsRAUWd()

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

Friends And Related Function Documentation

◆ Value

friend class Value
friend

Definition at line 31 of file ValueHandle.h.


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