LLVM API Documentation
#include <ValueHandle.h>
Public Member Functions | |
ValueHandleBase (HandleBaseKind Kind) | |
ValueHandleBase (HandleBaseKind Kind, Value *V) | |
ValueHandleBase (HandleBaseKind Kind, const ValueHandleBase &RHS) | |
~ValueHandleBase () | |
Value * | operator= (Value *RHS) |
Value * | operator= (const ValueHandleBase &RHS) |
Value * | operator-> () const |
Value & | operator* () const |
Static Public Member Functions | |
static void | ValueIsDeleted (Value *V) |
static void | ValueIsRAUWd (Value *Old, Value *New) |
Protected Types | |
enum | HandleBaseKind { Assert, Callback, Tracking, Weak } |
Protected Member Functions | |
Value * | getValPtr () const |
void | setValPtrInt (unsigned K) |
unsigned | getValPtrInt () const |
Static Protected Member Functions | |
static bool | isValid (Value *V) |
Friends | |
class | Value |
ValueHandleBase - 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 41 of file ValueHandle.h.
enum llvm::ValueHandleBase::HandleBaseKind [protected] |
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.
Definition at line 47 of file ValueHandle.h.
llvm::ValueHandleBase::ValueHandleBase | ( | HandleBaseKind | Kind | ) | [inline, explicit] |
Definition at line 66 of file ValueHandle.h.
llvm::ValueHandleBase::ValueHandleBase | ( | HandleBaseKind | Kind, |
Value * | V | ||
) | [inline] |
Definition at line 68 of file ValueHandle.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer(), and isValid().
llvm::ValueHandleBase::ValueHandleBase | ( | HandleBaseKind | Kind, |
const ValueHandleBase & | RHS | ||
) | [inline] |
Definition at line 73 of file ValueHandle.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer(), and isValid().
llvm::ValueHandleBase::~ValueHandleBase | ( | ) | [inline] |
Definition at line 78 of file ValueHandle.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer(), and isValid().
Value* llvm::ValueHandleBase::getValPtr | ( | ) | const [inline, protected] |
Definition at line 103 of file ValueHandle.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer().
Referenced by llvm::DebugRecVH::get(), llvm::SCEVUnknown::getType(), llvm::IVStrideUse::getUser(), llvm::SCEVUnknown::getValue(), llvm::DenseMapInfo< ValueMapCallbackVH< KeyT, ValueT, Config > >::isEqual(), llvm::WeakVH::operator Value *(), llvm::CallbackVH::operator Value *(), operator*(), operator->(), and llvm::ValueMapCallbackVH< KeyT, ValueT, Config >::Unwrap().
unsigned llvm::ValueHandleBase::getValPtrInt | ( | ) | const [inline, protected] |
Definition at line 106 of file ValueHandle.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getInt().
static bool llvm::ValueHandleBase::isValid | ( | Value * | V | ) | [inline, static, protected] |
Definition at line 108 of file ValueHandle.h.
Referenced by operator=(), ValueHandleBase(), and ~ValueHandleBase().
Value& llvm::ValueHandleBase::operator* | ( | ) | const [inline] |
Reimplemented in llvm::TrackingVH< ValueTy >, llvm::TrackingVH< MDNode >, llvm::AssertingVH< ValueTy >, llvm::AssertingVH< BasicBlock >, llvm::AssertingVH< Function >, and llvm::AssertingVH< const MDNode >.
Definition at line 100 of file ValueHandle.h.
References getValPtr().
Value* llvm::ValueHandleBase::operator-> | ( | ) | const [inline] |
Reimplemented in llvm::TrackingVH< ValueTy >, llvm::TrackingVH< MDNode >, llvm::AssertingVH< ValueTy >, llvm::AssertingVH< BasicBlock >, llvm::AssertingVH< Function >, and llvm::AssertingVH< const MDNode >.
Definition at line 99 of file ValueHandle.h.
References getValPtr().
Reimplemented in llvm::WeakVH.
Definition at line 83 of file ValueHandle.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer(), isValid(), and llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::setPointer().
Referenced by llvm::MMIAddrLabelMapCallbackPtr::setPtr(), and llvm::CallbackVH::setValPtr().
Value* llvm::ValueHandleBase::operator= | ( | const ValueHandleBase & | RHS | ) | [inline] |
Reimplemented in llvm::WeakVH.
Definition at line 91 of file ValueHandle.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer(), isValid(), and llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::setPointer().
void llvm::ValueHandleBase::setValPtrInt | ( | unsigned | K | ) | [inline, protected] |
Definition at line 105 of file ValueHandle.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::setInt().
void ValueHandleBase::ValueIsDeleted | ( | Value * | V | ) | [static] |
Definition at line 737 of file Value.cpp.
References Assert, Callback, llvm::dbgs(), llvm::Value::getContext(), llvm::Value::getName(), llvm::Value::getType(), llvm_unreachable, llvm::LLVMContext::pImpl, Tracking, llvm::LLVMContextImpl::ValueHandles, and Weak.
Referenced by llvm::Value::~Value().
void ValueHandleBase::ValueIsRAUWd | ( | Value * | Old, |
Value * | New | ||
) | [static] |
Definition at line 794 of file Value.cpp.
References Assert, Callback, llvm::dbgs(), llvm::Value::getContext(), llvm::Value::getName(), llvm::Value::getType(), llvm_unreachable, llvm::LLVMContext::pImpl, Tracking, llvm::LLVMContextImpl::ValueHandles, and Weak.
Referenced by processInstruction(), llvm::Value::replaceAllUsesWith(), and llvm::SSAUpdater::RewriteUse().
friend class Value [friend] |
Definition at line 42 of file ValueHandle.h.