LLVM  6.0.0svn
Public Types | Public Member Functions | Protected Types | List of all members
llvm::iplist_impl< IntrusiveListT, TraitsT > Class Template Reference

A wrapper around an intrusive list with callbacks and non-intrusive ownership. More...

#include "llvm/ADT/ilist.h"

Inheritance diagram for llvm::iplist_impl< IntrusiveListT, TraitsT >:
Inheritance graph
[legend]
Collaboration diagram for llvm::iplist_impl< IntrusiveListT, TraitsT >:
Collaboration graph
[legend]

Public Types

typedef base_list_type::pointer pointer
 
typedef base_list_type::const_pointer const_pointer
 
typedef base_list_type::reference reference
 
typedef base_list_type::const_reference const_reference
 
typedef base_list_type::value_type value_type
 
typedef base_list_type::size_type size_type
 
typedef base_list_type::difference_type difference_type
 
typedef base_list_type::iterator iterator
 
typedef base_list_type::const_iterator const_iterator
 
typedef base_list_type::reverse_iterator reverse_iterator
 
typedef base_list_type::const_reverse_iterator const_reverse_iterator
 

Public Member Functions

 iplist_impl ()=default
 
 iplist_impl (const iplist_impl &)=delete
 
iplist_imploperator= (const iplist_impl &)=delete
 
 iplist_impl (iplist_impl &&X)
 
iplist_imploperator= (iplist_impl &&X)
 
 ~iplist_impl ()
 
size_type max_size () const
 
void swap (iplist_impl &RHS)
 
iterator insert (iterator where, pointer New)
 
iterator insert (iterator where, const_reference New)
 
iterator insertAfter (iterator where, pointer New)
 
template<class Cloner >
void cloneFrom (const iplist_impl &L2, Cloner clone)
 Clone another list. More...
 
pointer remove (iterator &IT)
 
pointer remove (const iterator &IT)
 
pointer remove (pointer IT)
 
pointer remove (reference IT)
 
iterator erase (iterator where)
 
iterator erase (pointer IT)
 
iterator erase (reference IT)
 
void clearAndLeakNodesUnsafely ()
 Remove all nodes from the list like clear(), but do not call removeNodeFromList() or deleteNode(). More...
 
iterator erase (iterator first, iterator last)
 
void clear ()
 
void push_front (pointer val)
 
void push_back (pointer val)
 
void pop_front ()
 
void pop_back ()
 
template<class InIt >
void insert (iterator where, InIt first, InIt last)
 
void splice (iterator where, iplist_impl &L2)
 
void splice (iterator where, iplist_impl &L2, iterator first)
 
void splice (iterator where, iplist_impl &L2, iterator first, iterator last)
 
void splice (iterator where, iplist_impl &L2, reference N)
 
void splice (iterator where, iplist_impl &L2, pointer N)
 
template<class Compare >
void merge (iplist_impl &Right, Compare comp)
 
void merge (iplist_impl &Right)
 
pointer getPrevNode (reference N) const
 Get the previous node, or nullptr for the list head. More...
 
const_pointer getPrevNode (const_reference N) const
 Get the previous node, or nullptr for the list head. More...
 
pointer getNextNode (reference N) const
 Get the next node, or nullptr for the list tail. More...
 
const_pointer getNextNode (const_reference N) const
 Get the next node, or nullptr for the list tail. More...
 

Protected Types

typedef iplist_impl iplist_impl_type
 

Detailed Description

template<class IntrusiveListT, class TraitsT>
class llvm::iplist_impl< IntrusiveListT, TraitsT >

A wrapper around an intrusive list with callbacks and non-intrusive ownership.

This wraps a purely intrusive list (like simple_ilist) with a configurable traits class. The traits can implement callbacks and customize the ownership semantics.

This is a subset of ilist functionality that can safely be used on nodes of polymorphic types, i.e. a heterogeneous list with a common base class that holds the next/prev pointers. The only state of the list itself is an ilist_sentinel, which holds pointers to the first and last nodes in the list.

Definition at line 178 of file ilist.h.

Member Typedef Documentation

◆ const_iterator

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::const_iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::const_iterator

Definition at line 193 of file ilist.h.

◆ const_pointer

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::const_pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::const_pointer

Definition at line 186 of file ilist.h.

◆ const_reference

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::const_reference llvm::iplist_impl< IntrusiveListT, TraitsT >::const_reference

Definition at line 188 of file ilist.h.

◆ const_reverse_iterator

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::const_reverse_iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::const_reverse_iterator

Definition at line 196 of file ilist.h.

◆ difference_type

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::difference_type llvm::iplist_impl< IntrusiveListT, TraitsT >::difference_type

Definition at line 191 of file ilist.h.

◆ iplist_impl_type

template<class IntrusiveListT, class TraitsT>
typedef iplist_impl llvm::iplist_impl< IntrusiveListT, TraitsT >::iplist_impl_type
protected

Definition at line 182 of file ilist.h.

◆ iterator

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::iterator

Definition at line 192 of file ilist.h.

◆ pointer

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::pointer

Definition at line 185 of file ilist.h.

◆ reference

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::reference llvm::iplist_impl< IntrusiveListT, TraitsT >::reference

Definition at line 187 of file ilist.h.

◆ reverse_iterator

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::reverse_iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::reverse_iterator

Definition at line 194 of file ilist.h.

◆ size_type

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::size_type llvm::iplist_impl< IntrusiveListT, TraitsT >::size_type

Definition at line 190 of file ilist.h.

◆ value_type

template<class IntrusiveListT, class TraitsT>
typedef base_list_type::value_type llvm::iplist_impl< IntrusiveListT, TraitsT >::value_type

Definition at line 189 of file ilist.h.

Constructor & Destructor Documentation

◆ iplist_impl() [1/3]

template<class IntrusiveListT, class TraitsT>
llvm::iplist_impl< IntrusiveListT, TraitsT >::iplist_impl ( )
default

◆ iplist_impl() [2/3]

template<class IntrusiveListT, class TraitsT>
llvm::iplist_impl< IntrusiveListT, TraitsT >::iplist_impl ( const iplist_impl< IntrusiveListT, TraitsT > &  )
delete

◆ iplist_impl() [3/3]

template<class IntrusiveListT, class TraitsT>
llvm::iplist_impl< IntrusiveListT, TraitsT >::iplist_impl ( iplist_impl< IntrusiveListT, TraitsT > &&  X)
inline

Definition at line 215 of file ilist.h.

◆ ~iplist_impl()

template<class IntrusiveListT, class TraitsT>
llvm::iplist_impl< IntrusiveListT, TraitsT >::~iplist_impl ( )
inline

Definition at line 223 of file ilist.h.

Member Function Documentation

◆ clear()

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::clear ( )
inline

◆ clearAndLeakNodesUnsafely()

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::clearAndLeakNodesUnsafely ( )
inline

Remove all nodes from the list like clear(), but do not call removeNodeFromList() or deleteNode().

This should only be used immediately before freeing nodes in bulk to avoid traversing the list and bringing all the nodes into cache.

Definition at line 293 of file ilist.h.

Referenced by llvm::SlotIndexes::~SlotIndexes().

◆ cloneFrom()

template<class IntrusiveListT, class TraitsT>
template<class Cloner >
void llvm::iplist_impl< IntrusiveListT, TraitsT >::cloneFrom ( const iplist_impl< IntrusiveListT, TraitsT > &  L2,
Cloner  clone 
)
inline

Clone another list.

Definition at line 258 of file ilist.h.

◆ erase() [1/4]

template<class IntrusiveListT, class TraitsT>
iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::erase ( iterator  where)
inline

◆ erase() [2/4]

template<class IntrusiveListT, class TraitsT>
iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::erase ( pointer  IT)
inline

◆ erase() [3/4]

template<class IntrusiveListT, class TraitsT>
iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::erase ( reference  IT)
inline

◆ erase() [4/4]

template<class IntrusiveListT, class TraitsT>
iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::erase ( iterator  first,
iterator  last 
)
inline

Definition at line 316 of file ilist.h.

◆ getNextNode() [1/2]

template<class IntrusiveListT, class TraitsT>
pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::getNextNode ( reference  N) const
inline

Get the next node, or nullptr for the list tail.

Definition at line 385 of file ilist.h.

◆ getNextNode() [2/2]

template<class IntrusiveListT, class TraitsT>
const_pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::getNextNode ( const_reference  N) const
inline

Get the next node, or nullptr for the list tail.

Definition at line 392 of file ilist.h.

◆ getPrevNode() [1/2]

template<class IntrusiveListT, class TraitsT>
pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::getPrevNode ( reference  N) const
inline

Get the previous node, or nullptr for the list head.

Definition at line 373 of file ilist.h.

◆ getPrevNode() [2/2]

template<class IntrusiveListT, class TraitsT>
const_pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::getPrevNode ( const_reference  N) const
inline

Get the previous node, or nullptr for the list head.

Definition at line 380 of file ilist.h.

◆ insert() [1/3]

template<class IntrusiveListT, class TraitsT>
iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::insert ( iterator  where,
pointer  New 
)
inline

◆ insert() [2/3]

template<class IntrusiveListT, class TraitsT>
iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::insert ( iterator  where,
const_reference  New 
)
inline

Definition at line 246 of file ilist.h.

◆ insert() [3/3]

template<class IntrusiveListT, class TraitsT>
template<class InIt >
void llvm::iplist_impl< IntrusiveListT, TraitsT >::insert ( iterator  where,
InIt  first,
InIt  last 
)
inline

Definition at line 337 of file ilist.h.

◆ insertAfter()

template<class IntrusiveListT, class TraitsT>
iterator llvm::iplist_impl< IntrusiveListT, TraitsT >::insertAfter ( iterator  where,
pointer  New 
)
inline

◆ max_size()

template<class IntrusiveListT, class TraitsT>
size_type llvm::iplist_impl< IntrusiveListT, TraitsT >::max_size ( ) const
inline

Definition at line 226 of file ilist.h.

◆ merge() [1/2]

template<class IntrusiveListT, class TraitsT>
template<class Compare >
void llvm::iplist_impl< IntrusiveListT, TraitsT >::merge ( iplist_impl< IntrusiveListT, TraitsT > &  Right,
Compare  comp 
)
inline

Definition at line 362 of file ilist.h.

◆ merge() [2/2]

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::merge ( iplist_impl< IntrusiveListT, TraitsT > &  Right)
inline

◆ operator=() [1/2]

template<class IntrusiveListT, class TraitsT>
iplist_impl& llvm::iplist_impl< IntrusiveListT, TraitsT >::operator= ( const iplist_impl< IntrusiveListT, TraitsT > &  )
delete

◆ operator=() [2/2]

template<class IntrusiveListT, class TraitsT>
iplist_impl& llvm::iplist_impl< IntrusiveListT, TraitsT >::operator= ( iplist_impl< IntrusiveListT, TraitsT > &&  X)
inline

Definition at line 217 of file ilist.h.

◆ pop_back()

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::pop_back ( )
inline

◆ pop_front()

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::pop_front ( )
inline

◆ push_back()

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::push_back ( pointer  val)
inline

◆ push_front()

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::push_front ( pointer  val)
inline

Definition at line 325 of file ilist.h.

Referenced by insertCallRetPHI(), and llvm::MachineFunction::push_front().

◆ remove() [1/4]

template<class IntrusiveListT, class TraitsT>
pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::remove ( iterator IT)
inline

◆ remove() [2/4]

template<class IntrusiveListT, class TraitsT>
pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::remove ( const iterator IT)
inline

Definition at line 271 of file ilist.h.

◆ remove() [3/4]

template<class IntrusiveListT, class TraitsT>
pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::remove ( pointer  IT)
inline

Definition at line 276 of file ilist.h.

◆ remove() [4/4]

template<class IntrusiveListT, class TraitsT>
pointer llvm::iplist_impl< IntrusiveListT, TraitsT >::remove ( reference  IT)
inline

Definition at line 277 of file ilist.h.

◆ splice() [1/5]

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::splice ( iterator  where,
iplist_impl< IntrusiveListT, TraitsT > &  L2 
)
inline

◆ splice() [2/5]

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::splice ( iterator  where,
iplist_impl< IntrusiveListT, TraitsT > &  L2,
iterator  first 
)
inline

Definition at line 346 of file ilist.h.

◆ splice() [3/5]

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::splice ( iterator  where,
iplist_impl< IntrusiveListT, TraitsT > &  L2,
iterator  first,
iterator  last 
)
inline

Definition at line 351 of file ilist.h.

◆ splice() [4/5]

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::splice ( iterator  where,
iplist_impl< IntrusiveListT, TraitsT > &  L2,
reference  N 
)
inline

Definition at line 354 of file ilist.h.

◆ splice() [5/5]

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::splice ( iterator  where,
iplist_impl< IntrusiveListT, TraitsT > &  L2,
pointer  N 
)
inline

Definition at line 357 of file ilist.h.

◆ swap()

template<class IntrusiveListT, class TraitsT>
void llvm::iplist_impl< IntrusiveListT, TraitsT >::swap ( iplist_impl< IntrusiveListT, TraitsT > &  RHS)
inline

Definition at line 236 of file ilist.h.


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