LLVM  8.0.1
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::PointerUnion3< PT1, PT2, PT3 > Class Template Reference

A pointer union of three pointer types. More...

#include "llvm/ADT/PointerUnion.h"

Public Types

using InnerUnion = PointerUnion< PT1, PT2 >
 
using ValTy = PointerUnion< InnerUnion, PT3 >
 

Public Member Functions

 PointerUnion3 ()=default
 
 PointerUnion3 (PT1 V)
 
 PointerUnion3 (PT2 V)
 
 PointerUnion3 (PT3 V)
 
bool isNull () const
 Test if the pointer held in the union is null, regardless of which type it is. More...
 
 operator bool () const
 
template<typename T >
int is () const
 Test if the Union currently holds the type matching T. More...
 
template<typename T >
T get () const
 Returns the value of the specified pointer type. More...
 
template<typename T >
T dyn_cast () const
 Returns the current pointer if it is of the specified pointer type, otherwises returns null. More...
 
const PointerUnion3operator= (std::nullptr_t)
 Assignment from nullptr which just clears the union. More...
 
const PointerUnion3operator= (const PT1 &RHS)
 Assignment operators - Allow assigning into this union from either pointer type, setting the discriminator to remember what it came from. More...
 
const PointerUnion3operator= (const PT2 &RHS)
 
const PointerUnion3operator= (const PT3 &RHS)
 
void * getOpaqueValue () const
 

Static Public Member Functions

static PointerUnion3 getFromOpaqueValue (void *VP)
 

Detailed Description

template<typename PT1, typename PT2, typename PT3>
class llvm::PointerUnion3< PT1, PT2, PT3 >

A pointer union of three pointer types.

See documentation for PointerUnion for usage.

Definition at line 229 of file PointerUnion.h.

Member Typedef Documentation

◆ InnerUnion

template<typename PT1, typename PT2, typename PT3>
using llvm::PointerUnion3< PT1, PT2, PT3 >::InnerUnion = PointerUnion<PT1, PT2>

Definition at line 231 of file PointerUnion.h.

◆ ValTy

template<typename PT1, typename PT2, typename PT3>
using llvm::PointerUnion3< PT1, PT2, PT3 >::ValTy = PointerUnion<InnerUnion, PT3>

Definition at line 232 of file PointerUnion.h.

Constructor & Destructor Documentation

◆ PointerUnion3() [1/4]

template<typename PT1, typename PT2, typename PT3>
llvm::PointerUnion3< PT1, PT2, PT3 >::PointerUnion3 ( )
default

◆ PointerUnion3() [2/4]

template<typename PT1, typename PT2, typename PT3>
llvm::PointerUnion3< PT1, PT2, PT3 >::PointerUnion3 ( PT1  V)
inline

Definition at line 263 of file PointerUnion.h.

◆ PointerUnion3() [3/4]

template<typename PT1, typename PT2, typename PT3>
llvm::PointerUnion3< PT1, PT2, PT3 >::PointerUnion3 ( PT2  V)
inline

Definition at line 264 of file PointerUnion.h.

◆ PointerUnion3() [4/4]

template<typename PT1, typename PT2, typename PT3>
llvm::PointerUnion3< PT1, PT2, PT3 >::PointerUnion3 ( PT3  V)
inline

Definition at line 265 of file PointerUnion.h.

Member Function Documentation

◆ dyn_cast()

template<typename PT1, typename PT2, typename PT3>
template<typename T >
T llvm::PointerUnion3< PT1, PT2, PT3 >::dyn_cast ( ) const
inline

Returns the current pointer if it is of the specified pointer type, otherwises returns null.

Definition at line 295 of file PointerUnion.h.

References T.

◆ get()

template<typename PT1, typename PT2, typename PT3>
template<typename T >
T llvm::PointerUnion3< PT1, PT2, PT3 >::get ( ) const
inline

Returns the value of the specified pointer type.

If the specified pointer type is incorrect, assert.

Definition at line 284 of file PointerUnion.h.

References assert(), and T.

◆ getFromOpaqueValue()

template<typename PT1, typename PT2, typename PT3>
static PointerUnion3 llvm::PointerUnion3< PT1, PT2, PT3 >::getFromOpaqueValue ( void *  VP)
inlinestatic

◆ getOpaqueValue()

template<typename PT1, typename PT2, typename PT3>
void* llvm::PointerUnion3< PT1, PT2, PT3 >::getOpaqueValue ( ) const
inline

◆ is()

template<typename PT1, typename PT2, typename PT3>
template<typename T >
int llvm::PointerUnion3< PT1, PT2, PT3 >::is ( ) const
inline

Test if the Union currently holds the type matching T.

Definition at line 273 of file PointerUnion.h.

References T.

◆ isNull()

template<typename PT1, typename PT2, typename PT3>
bool llvm::PointerUnion3< PT1, PT2, PT3 >::isNull ( ) const
inline

Test if the pointer held in the union is null, regardless of which type it is.

Definition at line 269 of file PointerUnion.h.

References llvm::PointerUnion< PT1, PT2 >::isNull().

◆ operator bool()

template<typename PT1, typename PT2, typename PT3>
llvm::PointerUnion3< PT1, PT2, PT3 >::operator bool ( ) const
inlineexplicit

Definition at line 270 of file PointerUnion.h.

◆ operator=() [1/4]

template<typename PT1, typename PT2, typename PT3>
const PointerUnion3& llvm::PointerUnion3< PT1, PT2, PT3 >::operator= ( std::nullptr_t  )
inline

Assignment from nullptr which just clears the union.

Definition at line 302 of file PointerUnion.h.

◆ operator=() [2/4]

template<typename PT1, typename PT2, typename PT3>
const PointerUnion3& llvm::PointerUnion3< PT1, PT2, PT3 >::operator= ( const PT1 &  RHS)
inline

Assignment operators - Allow assigning into this union from either pointer type, setting the discriminator to remember what it came from.

Definition at line 309 of file PointerUnion.h.

◆ operator=() [3/4]

template<typename PT1, typename PT2, typename PT3>
const PointerUnion3& llvm::PointerUnion3< PT1, PT2, PT3 >::operator= ( const PT2 &  RHS)
inline

Definition at line 313 of file PointerUnion.h.

◆ operator=() [4/4]

template<typename PT1, typename PT2, typename PT3>
const PointerUnion3& llvm::PointerUnion3< PT1, PT2, PT3 >::operator= ( const PT3 &  RHS)
inline

Definition at line 317 of file PointerUnion.h.


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