LLVM API Documentation
#include <ValueHandle.h>
Public Member Functions | |
CallbackVH () | |
CallbackVH (Value *P) | |
operator Value * () const | |
virtual void | deleted () |
virtual void | allUsesReplacedWith (Value *) |
![]() | |
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 |
Protected Member Functions | |
CallbackVH (const CallbackVH &RHS) | |
virtual | ~CallbackVH () |
void | setValPtr (Value *P) |
![]() | |
Value * | getValPtr () const |
void | setValPtrInt (unsigned K) |
unsigned | getValPtrInt () const |
Additional Inherited Members | |
![]() | |
static void | ValueIsDeleted (Value *V) |
static void | ValueIsRAUWd (Value *Old, Value *New) |
![]() | |
enum | HandleBaseKind { Assert, Callback, Tracking, Weak } |
![]() | |
static bool | isValid (Value *V) |
CallbackVH - This is a value handle that allows subclasses to define callbacks that run when the underlying Value has RAUW called on it or is destroyed. This class can be used as the key of a map, as long as the user takes it out of the map before calling setValPtr() (since the map has to rearrange itself when the pointer changes). Unlike ValueHandleBase, this class has a vtable and a virtual destructor.
Definition at line 341 of file ValueHandle.h.
|
inlineprotected |
Definition at line 344 of file ValueHandle.h.
|
inlineprotectedvirtual |
Definition at line 347 of file ValueHandle.h.
|
inline |
Definition at line 354 of file ValueHandle.h.
|
inline |
Definition at line 355 of file ValueHandle.h.
|
inlinevirtual |
Called when this->getValPtr()->replaceAllUsesWith(new_value) is called, before any of the uses have actually been replaced. If WeakVH were implemented as a CallbackVH, it would use this method to call setValPtr(new_value). AssertingVH would do nothing in this method.
Reimplemented in llvm::DebugRecVH, llvm::ValueMapCallbackVH< KeyT, ValueT, Config >, llvm::MDNodeOperand, and llvm::MMIAddrLabelMapCallbackPtr.
Definition at line 375 of file ValueHandle.h.
|
inlinevirtual |
Called when this->getValPtr() is destroyed, inside ~Value(), so you may call any non-virtual Value method on getValPtr(), but no subclass methods. If WeakVH were implemented as a CallbackVH, it would use this method to call setValPtr(NULL). AssertingVH would use this method to cause an assertion failure.
All implementations must remove the reference from this object to the Value that's being destroyed.
Reimplemented in llvm::DebugRecVH, llvm::ValueMapCallbackVH< KeyT, ValueT, Config >, llvm::MDNodeOperand, and llvm::MMIAddrLabelMapCallbackPtr.
Definition at line 369 of file ValueHandle.h.
References setValPtr().
|
inline |
Definition at line 357 of file ValueHandle.h.
References llvm::ValueHandleBase::getValPtr().
|
inlineprotected |
Definition at line 349 of file ValueHandle.h.
References llvm::ValueHandleBase::operator=().
Referenced by llvm::DebugRecVH::allUsesReplacedWith(), llvm::DebugRecVH::deleted(), deleted(), llvm::MDNodeOperand::set(), and llvm::IVStrideUse::setUser().