GCC Middle and Back End API Reference
list_head< T > Class Template Reference
Inheritance diagram for list_head< T >:

Data Structures

class  range
 

Public Member Functions

 list_head ()
 
range release ()
 
void push_back (range)
 
range remove (range)
 
void replace (range, range)
 
Tsingleton () const
 

Data Fields

Tfirst
 
Tlast
 

Detailed Description

template<typename T>
class list_head< T >
Simple list structure for items of type T, for use when being part
of a list is an inherent property of T.  T must have members equivalent
to "T *prev, *next;" and a function "void set_parent (list_head <T> *)"
to set the parent list.   

Constructor & Destructor Documentation

◆ list_head()

template<typename T >
list_head< T >::list_head ( )

Member Function Documentation

◆ push_back()

template<typename T >
void list_head< T >::push_back ( range r)
Add R to the end of the list.   

References last, filedep::next, and r.

Referenced by add_decision(), and use_pattern().

◆ release()

template<typename T >
list_head< T >::range list_head< T >::release ( )
Empty the list and return the previous contents as a range that can
be inserted into other lists.   

References last, and r.

Referenced by use_pattern().

◆ remove()

template<typename T >
list_head< T >::range list_head< T >::remove ( range r)
Remove R from the list.  R remains valid and can be inserted into
other lists.   

References last, filedep::next, r, and list_head< T >::range::start.

◆ replace()

template<typename T >
void list_head< T >::replace ( range oldr,
range newr )
Replace OLDR with NEWR.  OLDR remains valid and can be inserted into
other lists.   

References ggc_alloc(), and last.

Referenced by collapse_optional_decisions(), and simplify_tests().

◆ singleton()

template<typename T >
T * list_head< T >::singleton ( ) const
If the list contains a single item, return that item, otherwise return
null.   

References last.

Referenced by collapse_optional_decisions(), common_test_p(), find_common_test(), print_decision(), and simplify_tests().

Field Documentation

◆ first

◆ last

template<typename T >
T * list_head< T >::last

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