LLVM  8.0.1
Public Types | Public Member Functions | 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...
 

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 168 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 180 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 173 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 175 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 183 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 178 of file ilist.h.

◆ iterator

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

Definition at line 179 of file ilist.h.

◆ pointer

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

Definition at line 172 of file ilist.h.

◆ reference

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

Definition at line 174 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 181 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 177 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 176 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 202 of file ilist.h.

◆ ~iplist_impl()

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

Definition at line 210 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 280 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 245 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 303 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 372 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 379 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 360 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 367 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 233 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 324 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 213 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 349 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 204 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 312 of file ilist.h.

Referenced by 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 258 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 263 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 264 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 333 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 338 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 341 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 344 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 223 of file ilist.h.


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