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

◆ wrapped_t

typedef PtrType_t opt_wrapper< PtrType_t >::wrapped_t

Constructor & Destructor Documentation

◆ opt_pointer_wrapper() [1/2]

◆ opt_pointer_wrapper() [2/2]

Member Function Documentation

◆ failure_at()

References NULL.

Referenced by vect_analyze_loop().

◆ get_problem()

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

◆ get_result()

wrapped_t opt_wrapper< PtrType_t >::get_result ( ) const

◆ if()

◆ operator wrapped_t()

opt_wrapper< PtrType_t >::operator wrapped_t ( ) const

◆ operator->()

◆ propagate_failure()

◆ success()

Field Documentation

◆ m_result

wrapped_t opt_wrapper< PtrType_t >::m_result

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