LLVM  6.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::PointerUnion4< PT1, PT2, PT3, PT4 > Class Template Reference

A pointer union of four pointer types. More...

#include "llvm/ADT/PointerUnion.h"

Public Types

using InnerUnion1 = PointerUnion< PT1, PT2 >
 
using InnerUnion2 = PointerUnion< PT3, PT4 >
 
using ValTy = PointerUnion< InnerUnion1, InnerUnion2 >
 

Public Member Functions

 PointerUnion4 ()=default
 
 PointerUnion4 (PT1 V)
 
 PointerUnion4 (PT2 V)
 
 PointerUnion4 (PT3 V)
 
 PointerUnion4 (PT4 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 PointerUnion4operator= (std::nullptr_t)
 Assignment from nullptr which just clears the union. More...
 
const PointerUnion4operator= (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 PointerUnion4operator= (const PT2 &RHS)
 
const PointerUnion4operator= (const PT3 &RHS)
 
const PointerUnion4operator= (const PT4 &RHS)
 
void * getOpaqueValue () const
 

Static Public Member Functions

static PointerUnion4 getFromOpaqueValue (void *VP)
 

Detailed Description

template<typename PT1, typename PT2, typename PT3, typename PT4>
class llvm::PointerUnion4< PT1, PT2, PT3, PT4 >

A pointer union of four pointer types.

See documentation for PointerUnion for usage.

Definition at line 352 of file PointerUnion.h.

Member Typedef Documentation

◆ InnerUnion1

template<typename PT1, typename PT2, typename PT3, typename PT4>
using llvm::PointerUnion4< PT1, PT2, PT3, PT4 >::InnerUnion1 = PointerUnion<PT1, PT2>

Definition at line 354 of file PointerUnion.h.

◆ InnerUnion2

template<typename PT1, typename PT2, typename PT3, typename PT4>
using llvm::PointerUnion4< PT1, PT2, PT3, PT4 >::InnerUnion2 = PointerUnion<PT3, PT4>

Definition at line 355 of file PointerUnion.h.

◆ ValTy

template<typename PT1, typename PT2, typename PT3, typename PT4>
using llvm::PointerUnion4< PT1, PT2, PT3, PT4 >::ValTy = PointerUnion<InnerUnion1, InnerUnion2>

Definition at line 356 of file PointerUnion.h.

Constructor & Destructor Documentation

◆ PointerUnion4() [1/5]

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

◆ PointerUnion4() [2/5]

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

Definition at line 363 of file PointerUnion.h.

◆ PointerUnion4() [3/5]

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

Definition at line 364 of file PointerUnion.h.

◆ PointerUnion4() [4/5]

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

Definition at line 365 of file PointerUnion.h.

◆ PointerUnion4() [5/5]

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

Definition at line 366 of file PointerUnion.h.

Member Function Documentation

◆ dyn_cast()

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

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

Definition at line 398 of file PointerUnion.h.

References T.

◆ get()

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

Returns the value of the specified pointer type.

If the specified pointer type is incorrect, assert.

Definition at line 386 of file PointerUnion.h.

References assert(), and T.

◆ getFromOpaqueValue()

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

◆ getOpaqueValue()

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

◆ is()

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

Test if the Union currently holds the type matching T.

Definition at line 374 of file PointerUnion.h.

References T.

◆ isNull()

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

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

Definition at line 370 of file PointerUnion.h.

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

◆ operator bool()

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

Definition at line 371 of file PointerUnion.h.

References llvm::yaml::isNull().

◆ operator=() [1/5]

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

Assignment from nullptr which just clears the union.

Definition at line 405 of file PointerUnion.h.

◆ operator=() [2/5]

template<typename PT1, typename PT2, typename PT3, typename PT4>
const PointerUnion4& llvm::PointerUnion4< PT1, PT2, PT3, PT4 >::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 412 of file PointerUnion.h.

◆ operator=() [3/5]

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

Definition at line 416 of file PointerUnion.h.

◆ operator=() [4/5]

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

Definition at line 420 of file PointerUnion.h.

◆ operator=() [5/5]

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

Definition at line 424 of file PointerUnion.h.


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