class CallbackVH

Declaration

class CallbackVH : public ValueHandleBase { /* full declaration omitted */ };

Description

Value handle with callbacks on RAUW and destruction. 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.

Declared at: llvm/include/llvm/IR/ValueHandle.h:383

Inherits from: ValueHandleBase

Member Variables

Method Overview

Inherited from ValueHandleBase:

Methods

CallbackVH(const llvm::CallbackVH&)

Declared at: llvm/include/llvm/IR/ValueHandle.h:387

Parameters

const llvm::CallbackVH&

CallbackVH()

Declared at: llvm/include/llvm/IR/ValueHandle.h:395

CallbackVH(llvm::Value* P)

Declared at: llvm/include/llvm/IR/ValueHandle.h:396

Parameters

llvm::Value* P

CallbackVH(const llvm::Value* P)

Declared at: llvm/include/llvm/IR/ValueHandle.h:397

Parameters

const llvm::Value* P

virtual void allUsesReplacedWith(llvm::Value*)

Description

Callback for Value RAUW. Called when this->getValPtr()->replaceAllUsesWith(new_value) is called, _before_ any of the uses have actually been replaced. If WeakTrackingVH were implemented as a CallbackVH, it would use this method to call setValPtr(new_value). AssertingVH would do nothing in this method.

Declared at: llvm/include/llvm/IR/ValueHandle.h:423

Parameters

llvm::Value*

virtual void anchor()

Declared at: llvm/include/llvm/IR/ValueHandle.h:384

virtual void deleted()

Description

Callback for Value destruction. Called when this->getValPtr() is destroyed, inside ~Value(), so you may call any non-virtual Value method on getValPtr(), but no subclass methods. If WeakTrackingVH 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.

Declared at: llvm/include/llvm/IR/ValueHandle.h:414

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

Declared at: llvm/include/llvm/IR/ValueHandle.h:399

void setValPtr(llvm::Value* P)

Declared at: llvm/include/llvm/IR/ValueHandle.h:390

Parameters

llvm::Value* P

~CallbackVH()

Declared at: llvm/include/llvm/IR/ValueHandle.h:386