GCC Middle and Back End API Reference
opt_pointer_wrapper< PtrType_t > Class Template Reference

#include <opt-problem.h>

Inheritance diagram for opt_pointer_wrapper< PtrType_t >:
Collaboration diagram for opt_pointer_wrapper< PtrType_t >:

Public Types

typedef PtrType_t wrapped_pointer_t
 
typedef PtrType_t wrapped_t
 

Public Member Functions

static opt_pointer_wrapper< wrapped_pointer_tif (dump_enabled_p())
 
return opt_pointer_wrapper (NULL, problem)
 
wrapped_pointer_t operator-> () const
 
 operator wrapped_t () const
 
wrapped_t get_result () const
 
opt_problemget_problem () const
 

Static Public Member Functions

static opt_pointer_wrapper< wrapped_pointer_tsuccess (wrapped_pointer_t ptr)
 
static opt_pointer_wrapper< wrapped_pointer_tfailure_at (const dump_location_t &loc, const char *fmt,...) ATTRIBUTE_GCC_DUMP_PRINTF(2
 
template<typename S >
static opt_pointer_wrapper< wrapped_pointer_tpropagate_failure (opt_wrapper< S > other)
 

Private Member Functions

 opt_pointer_wrapper (wrapped_pointer_t result, opt_problem *problem)
 

Private Attributes

wrapped_t m_result
 

Detailed Description

template<typename PtrType_t>
class opt_pointer_wrapper< PtrType_t >
Subclass of opt_wrapper<T> where T is a pointer type, for tracking
success/failure, where:
- a non-NULL value signifies "success", and
- a NULL value signifies "failure",
whilst effectively propagating an opt_problem * describing any failure
back up the call stack.   

Member Typedef Documentation

◆ wrapped_pointer_t

template<typename PtrType_t >
PtrType_t opt_pointer_wrapper< PtrType_t >::wrapped_pointer_t

◆ wrapped_t

PtrType_t opt_wrapper< PtrType_t >::wrapped_t
inherited

Constructor & Destructor Documentation

◆ opt_pointer_wrapper() [1/2]

◆ opt_pointer_wrapper() [2/2]

template<typename PtrType_t >
opt_pointer_wrapper< PtrType_t >::opt_pointer_wrapper ( wrapped_pointer_t result,
opt_problem * problem )
inlineprivate

Member Function Documentation

◆ failure_at()

template<typename PtrType_t >
static opt_pointer_wrapper< wrapped_pointer_t > opt_pointer_wrapper< PtrType_t >::failure_at ( const dump_location_t & loc,
const char * fmt,
... )
static

References NULL.

Referenced by vect_analyze_loop().

◆ get_problem()

opt_problem * opt_wrapper< PtrType_t >::get_problem ( ) const
inlineinherited

◆ get_result()

wrapped_t opt_wrapper< PtrType_t >::get_result ( ) const
inlineinherited

◆ if()

template<typename PtrType_t >
static opt_pointer_wrapper< wrapped_pointer_t > opt_pointer_wrapper< PtrType_t >::if ( dump_enabled_p() )
inline

References ap.

◆ operator wrapped_t()

opt_wrapper< PtrType_t >::operator wrapped_t ( ) const
inlineinherited

◆ operator->()

template<typename PtrType_t >
wrapped_pointer_t opt_pointer_wrapper< PtrType_t >::operator-> ( ) const
inline

◆ propagate_failure()

template<typename PtrType_t >
template<typename S >
static opt_pointer_wrapper< wrapped_pointer_t > opt_pointer_wrapper< PtrType_t >::propagate_failure ( opt_wrapper< S > other)
inlinestatic

◆ success()

template<typename PtrType_t >
static opt_pointer_wrapper< wrapped_pointer_t > opt_pointer_wrapper< PtrType_t >::success ( wrapped_pointer_t ptr)
inlinestatic

Field Documentation

◆ m_result

wrapped_t opt_wrapper< PtrType_t >::m_result
privateinherited

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