LLVM  8.0.1
Public Member Functions | Static Public Member Functions | List of all members
llvm::TrackingVH< ValueTy > Class Template Reference

Value handle that tracks a Value across RAUW. More...

#include "llvm/IR/ValueHandle.h"

Inheritance diagram for llvm::TrackingVH< ValueTy >:
Inheritance graph
[legend]

Public Member Functions

ValueTy * getValPtr () const
 
void setValPtr (ValueTy *P)
 
 TrackingVH ()=default
 
 TrackingVH (ValueTy *P)
 
 operator ValueTy * () const
 
ValueTy * operator= (ValueTy *RHS)
 
ValueTy * operator-> () const
 
ValueTy & operator* () const
 

Static Public Member Functions

static ValueGetAsValue (Value *V)
 
static ValueGetAsValue (const Value *V)
 

Detailed Description

template<typename ValueTy>
class llvm::TrackingVH< ValueTy >

Value handle that tracks a Value across RAUW.

TrackingVH is designed for situations where a client needs to hold a handle to a Value (or subclass) across some operations which may move that value, but should never destroy it or replace it with some unacceptable type.

It is an error to attempt to replace a value with one of a type which is incompatible with any of its outstanding TrackingVHs.

It is an error to read from a TrackingVH that does not point to a valid value. A TrackingVH is said to not point to a valid value if either it hasn't yet been assigned a value yet or because the value it was tracking has since been deleted.

Assigning a value to a TrackingVH is always allowed, even if said TrackingVH no longer points to a valid value.

Definition at line 337 of file ValueHandle.h.

Constructor & Destructor Documentation

◆ TrackingVH() [1/2]

template<typename ValueTy>
llvm::TrackingVH< ValueTy >::TrackingVH ( )
default

◆ TrackingVH() [2/2]

template<typename ValueTy>
llvm::TrackingVH< ValueTy >::TrackingVH ( ValueTy *  P)
inline

Definition at line 367 of file ValueHandle.h.

Member Function Documentation

◆ GetAsValue() [1/2]

template<typename ValueTy>
static Value* llvm::TrackingVH< ValueTy >::GetAsValue ( Value V)
inlinestatic

Definition at line 362 of file ValueHandle.h.

◆ GetAsValue() [2/2]

template<typename ValueTy>
static Value* llvm::TrackingVH< ValueTy >::GetAsValue ( const Value V)
inlinestatic

Definition at line 363 of file ValueHandle.h.

◆ getValPtr()

template<typename ValueTy>
ValueTy* llvm::TrackingVH< ValueTy >::getValPtr ( ) const
inline

Definition at line 341 of file ValueHandle.h.

◆ operator ValueTy *()

template<typename ValueTy>
llvm::TrackingVH< ValueTy >::operator ValueTy * ( ) const
inline

Definition at line 369 of file ValueHandle.h.

References llvm::ValueHandleBase::getValPtr().

◆ operator*()

template<typename ValueTy>
ValueTy& llvm::TrackingVH< ValueTy >::operator* ( ) const
inline

Definition at line 379 of file ValueHandle.h.

◆ operator->()

template<typename ValueTy>
ValueTy* llvm::TrackingVH< ValueTy >::operator-> ( ) const
inline

Definition at line 378 of file ValueHandle.h.

◆ operator=()

template<typename ValueTy>
ValueTy* llvm::TrackingVH< ValueTy >::operator= ( ValueTy *  RHS)
inline

Definition at line 373 of file ValueHandle.h.

◆ setValPtr()

template<typename ValueTy>
void llvm::TrackingVH< ValueTy >::setValPtr ( ValueTy *  P)
inline

Definition at line 354 of file ValueHandle.h.


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