GCC Middle and Back End API Reference
opt_mode< T > Class Template Reference

#include <machmode.h>

Inheritance diagram for opt_mode< T >:

Public Types

enum  from_int { dummy = MAX_MACHINE_MODE }
 

Public Member Functions

ALWAYS_INLINE CONSTEXPR opt_mode ()
 
ALWAYS_INLINE CONSTEXPR opt_mode (const T &m)
 
template<typename U >
ALWAYS_INLINE CONSTEXPR opt_mode (const U &m)
 
ALWAYS_INLINE CONSTEXPR opt_mode (from_int m)
 
machine_mode else_void () const
 
machine_mode else_blk () const
 
machine_mode else_mode (machine_mode) const
 
T require () const
 
bool exists () const
 
template<typename U >
bool exists (U *) const
 
bool operator== (const T &m) const
 
bool operator!= (const T &m) const
 

Private Attributes

machine_mode m_mode
 

Detailed Description

template<typename T>
class opt_mode< T >
An optional T (i.e. a T or nothing), where T is some form of mode class.   

Member Enumeration Documentation

◆ from_int

Enumerator
dummy 

Constructor & Destructor Documentation

◆ opt_mode() [1/4]

◆ opt_mode() [2/4]

◆ opt_mode() [3/4]

template<typename T >
template<typename U >
ALWAYS_INLINE CONSTEXPR opt_mode< T >::opt_mode ( const U & m)
inline

◆ opt_mode() [4/4]

Member Function Documentation

◆ else_blk()

◆ else_mode()

template<typename T >
machine_mode opt_mode< T >::else_mode ( machine_mode fallback) const
inline
If the T exists, return its enum value, otherwise return FALLBACK.   

References ggc_alloc().

Referenced by opt_mode< T >::else_blk().

◆ else_void()

template<typename T >
ALWAYS_INLINE machine_mode opt_mode< T >::else_void ( ) const
If the object contains a T, return its enum value, otherwise return
E_VOIDmode.   

Referenced by as_a(), dyn_cast(), and is_a().

◆ exists() [1/2]

◆ exists() [2/2]

template<typename T >
template<typename U >
bool opt_mode< T >::exists ( U * mode) const
inline
Return true if the object contains a T, storing it in *MODE if so.   

References ggc_alloc(), and T.

◆ operator!=()

template<typename T >
bool opt_mode< T >::operator!= ( const T & m) const
inline

References opt_mode< T >::m_mode.

◆ operator==()

template<typename T >
bool opt_mode< T >::operator== ( const T & m) const
inline

References opt_mode< T >::m_mode.

◆ require()

Field Documentation

◆ m_mode

template<typename T >
machine_mode opt_mode< T >::m_mode
private

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