GCC Middle and Back End API Reference
pointer_mux< T1, T2 > Class Template Reference

#include <mux-utils.h>

Inheritance diagram for pointer_mux< T1, T2 >:

Public Member Functions

 pointer_mux ()=default
 
 pointer_mux (std::nullptr_t)
 
template<typename T , typename Enable = typename std::enable_if<std::is_convertible<T *, T1 *>::value != std::is_convertible<T *, T2 *>::value>::type>
 pointer_mux (T *ptr)
 
 operator bool () const
 
void set_first (T1 *ptr)
 
void set_second (T2 *ptr)
 
bool is_first () const
 
bool is_second () const
 
T1 * known_first () const
 
T2 * known_second () const
 
T1 * first_or_null () const
 
T2 * second_or_null () const
 
bool operator== (const pointer_mux &pm) const
 
bool operator!= (const pointer_mux &pm) const
 
template<typename T >
bool is_a () const
 
template<typename T >
T as_a () const
 
template<typename T >
T dyn_cast () const
 

Static Public Member Functions

static pointer_mux first (T1 *)
 
static pointer_mux second (T2 *)
 

Private Member Functions

 pointer_mux (char *ptr)
 

Private Attributes

char * m_ptr
 

Constructor & Destructor Documentation

◆ pointer_mux() [1/4]

template<typename T1 , typename T2 = T1>
pointer_mux< T1, T2 >::pointer_mux ( )
default

◆ pointer_mux() [2/4]

template<typename T1 , typename T2 = T1>
pointer_mux< T1, T2 >::pointer_mux ( std::nullptr_t )
inline

◆ pointer_mux() [3/4]

template<typename T1 , typename T2 >
template<typename T , typename Enable >
pointer_mux< T1, T2 >::pointer_mux ( T * ptr)
inline

◆ pointer_mux() [4/4]

template<typename T1 , typename T2 = T1>
pointer_mux< T1, T2 >::pointer_mux ( char * ptr)
inlineprivate

Member Function Documentation

◆ as_a()

template<typename T1 , typename T2 >
template<typename T >
T pointer_mux< T1, T2 >::as_a ( ) const
inline

References gcc_checking_assert.

◆ dyn_cast()

template<typename T1 , typename T2 >
template<typename T >
T pointer_mux< T1, T2 >::dyn_cast ( ) const
inline

◆ first()

template<typename T1 , typename T2 >
pointer_mux< T1, T2 > pointer_mux< T1, T2 >::first ( T1 * ptr)
inlinestatic

◆ first_or_null()

template<typename T1 , typename T2 >
T1 * pointer_mux< T1, T2 >::first_or_null ( ) const
inline

◆ is_a()

template<typename T1 , typename T2 >
template<typename T >
bool pointer_mux< T1, T2 >::is_a ( ) const
inline

◆ is_first()

template<typename T1 , typename T2 = T1>
bool pointer_mux< T1, T2 >::is_first ( ) const
inline

References pointer_mux< T1, T2 >::m_ptr.

Referenced by dv_is_decl_p().

◆ is_second()

template<typename T1 , typename T2 = T1>
bool pointer_mux< T1, T2 >::is_second ( ) const
inline

◆ known_first()

template<typename T1 , typename T2 = T1>
T1 * pointer_mux< T1, T2 >::known_first ( ) const
inline

References pointer_mux< T1, T2 >::m_ptr.

Referenced by dv_as_decl().

◆ known_second()

template<typename T1 , typename T2 = T1>
T2 * pointer_mux< T1, T2 >::known_second ( ) const
inline

References pointer_mux< T1, T2 >::m_ptr.

Referenced by dv_as_value().

◆ operator bool()

template<typename T1 , typename T2 = T1>
pointer_mux< T1, T2 >::operator bool ( ) const
inlineexplicit

◆ operator!=()

template<typename T1 , typename T2 = T1>
bool pointer_mux< T1, T2 >::operator!= ( const pointer_mux< T1, T2 > & pm) const
inline

◆ operator==()

template<typename T1 , typename T2 = T1>
bool pointer_mux< T1, T2 >::operator== ( const pointer_mux< T1, T2 > & pm) const
inline

◆ second()

template<typename T1 , typename T2 >
pointer_mux< T1, T2 > pointer_mux< T1, T2 >::second ( T2 * ptr)
inlinestatic

◆ second_or_null()

template<typename T1 , typename T2 >
T2 * pointer_mux< T1, T2 >::second_or_null ( ) const
inline

◆ set_first()

template<typename T1 , typename T2 = T1>
void pointer_mux< T1, T2 >::set_first ( T1 * ptr)
inline

◆ set_second()

template<typename T1 , typename T2 = T1>
void pointer_mux< T1, T2 >::set_second ( T2 * ptr)
inline

Field Documentation

◆ m_ptr


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