LLVM 20.0.0git
Public Types | Public Member Functions | Friends | List of all members
llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst > Class Template Reference

Iterator for intrusive lists based on ilist_node. More...

#include "llvm/ADT/ilist_iterator.h"

Inheritance diagram for llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >:
Inheritance graph
[legend]

Public Types

using value_type = typename Traits::value_type
 
using pointer = typename Traits::pointer
 
using reference = typename Traits::reference
 
using difference_type = ptrdiff_t
 
using iterator_category = std::bidirectional_iterator_tag
 
using const_pointer = typename OptionsT::const_pointer
 
using const_reference = typename OptionsT::const_reference
 

Public Member Functions

 ilist_iterator_w_bits (node_reference N)
 Create from an ilist_node.
 
 ilist_iterator_w_bits (pointer NP)
 
 ilist_iterator_w_bits (reference NR)
 
 ilist_iterator_w_bits ()=default
 
template<bool RHSIsConst>
 ilist_iterator_w_bits (const ilist_iterator_w_bits< OptionsT, IsReverse, RHSIsConst > &RHS, std::enable_if_t< IsConst||!RHSIsConst, void * >=nullptr)
 
template<bool RHSIsConst>
std::enable_if_t< IsConst||!RHSIsConst, ilist_iterator_w_bits & > operator= (const ilist_iterator_w_bits< OptionsT, IsReverse, RHSIsConst > &RHS)
 
 ilist_iterator_w_bits (const ilist_iterator_w_bits< OptionsT, !IsReverse, IsConst > &RHS)
 Explicit conversion between forward/reverse iterators.
 
ilist_iterator_w_bits< OptionsT, !IsReverse, IsConst > getReverse () const
 Get a reverse iterator to the same node.
 
ilist_iterator_w_bits< OptionsT, IsReverse, false > getNonConst () const
 Const-cast.
 
reference operator* () const
 
pointer operator-> () const
 
ilist_iterator_w_bitsoperator-- ()
 
ilist_iterator_w_bitsoperator++ ()
 
ilist_iterator_w_bits operator-- (int)
 
ilist_iterator_w_bits operator++ (int)
 
bool isValid () const
 
node_pointer getNodePtr () const
 Get the underlying ilist_node.
 
bool isEnd () const
 Check for end. Only valid if ilist_sentinel_tracking<true>.
 
bool getHeadBit () const
 
bool getTailBit () const
 
void setHeadBit (bool SetBit) const
 
void setTailBit (bool SetBit) const
 

Friends

bool operator== (const ilist_iterator_w_bits &LHS, const ilist_iterator_w_bits &RHS)
 
bool operator!= (const ilist_iterator_w_bits &LHS, const ilist_iterator_w_bits &RHS)
 

Detailed Description

template<class OptionsT, bool IsReverse, bool IsConst>
class llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >

Iterator for intrusive lists based on ilist_node.

Much like ilist_iterator, but with the addition of two bits recording whether this position (when in a range) is half or fully open.

Definition at line 214 of file ilist_iterator.h.

Member Typedef Documentation

◆ const_pointer

template<class OptionsT , bool IsReverse, bool IsConst>
using llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::const_pointer = typename OptionsT::const_pointer

Definition at line 235 of file ilist_iterator.h.

◆ const_reference

template<class OptionsT , bool IsReverse, bool IsConst>
using llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::const_reference = typename OptionsT::const_reference

Definition at line 236 of file ilist_iterator.h.

◆ difference_type

template<class OptionsT , bool IsReverse, bool IsConst>
using llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::difference_type = ptrdiff_t

Definition at line 233 of file ilist_iterator.h.

◆ iterator_category

template<class OptionsT , bool IsReverse, bool IsConst>
using llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::iterator_category = std::bidirectional_iterator_tag

Definition at line 234 of file ilist_iterator.h.

◆ pointer

template<class OptionsT , bool IsReverse, bool IsConst>
using llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::pointer = typename Traits::pointer

Definition at line 231 of file ilist_iterator.h.

◆ reference

template<class OptionsT , bool IsReverse, bool IsConst>
using llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::reference = typename Traits::reference

Definition at line 232 of file ilist_iterator.h.

◆ value_type

template<class OptionsT , bool IsReverse, bool IsConst>
using llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::value_type = typename Traits::value_type

Definition at line 230 of file ilist_iterator.h.

Constructor & Destructor Documentation

◆ ilist_iterator_w_bits() [1/6]

template<class OptionsT , bool IsReverse, bool IsConst>
llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::ilist_iterator_w_bits ( node_reference  N)
inlineexplicit

Create from an ilist_node.

Definition at line 253 of file ilist_iterator.h.

◆ ilist_iterator_w_bits() [2/6]

template<class OptionsT , bool IsReverse, bool IsConst>
llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::ilist_iterator_w_bits ( pointer  NP)
inlineexplicit

Definition at line 255 of file ilist_iterator.h.

◆ ilist_iterator_w_bits() [3/6]

template<class OptionsT , bool IsReverse, bool IsConst>
llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::ilist_iterator_w_bits ( reference  NR)
inlineexplicit

Definition at line 257 of file ilist_iterator.h.

◆ ilist_iterator_w_bits() [4/6]

template<class OptionsT , bool IsReverse, bool IsConst>
llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::ilist_iterator_w_bits ( )
default

◆ ilist_iterator_w_bits() [5/6]

template<class OptionsT , bool IsReverse, bool IsConst>
template<bool RHSIsConst>
llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::ilist_iterator_w_bits ( const ilist_iterator_w_bits< OptionsT, IsReverse, RHSIsConst > &  RHS,
std::enable_if_t< IsConst||!RHSIsConst, void * >  = nullptr 
)
inline

Definition at line 264 of file ilist_iterator.h.

References RHS.

◆ ilist_iterator_w_bits() [6/6]

template<class OptionsT , bool IsReverse, bool IsConst>
llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::ilist_iterator_w_bits ( const ilist_iterator_w_bits< OptionsT, !IsReverse, IsConst > &  RHS)
inlineexplicit

Explicit conversion between forward/reverse iterators.

Translate between forward and reverse iterators without changing range boundaries. The resulting iterator will dereference (and have a handle) to the previous node, which is somewhat unexpected; but converting the two endpoints in a range will give the same range in reverse.

This matches std::reverse_iterator conversions.

Definition at line 291 of file ilist_iterator.h.

Member Function Documentation

◆ getHeadBit()

template<class OptionsT , bool IsReverse, bool IsConst>
bool llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::getHeadBit ( ) const
inline

Definition at line 369 of file ilist_iterator.h.

◆ getNodePtr()

template<class OptionsT , bool IsReverse, bool IsConst>
node_pointer llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::getNodePtr ( ) const
inline

Get the underlying ilist_node.

Definition at line 364 of file ilist_iterator.h.

◆ getNonConst()

template<class OptionsT , bool IsReverse, bool IsConst>
ilist_iterator_w_bits< OptionsT, IsReverse, false > llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::getNonConst ( ) const
inline

Const-cast.

Definition at line 307 of file ilist_iterator.h.

◆ getReverse()

template<class OptionsT , bool IsReverse, bool IsConst>
ilist_iterator_w_bits< OptionsT, !IsReverse, IsConst > llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::getReverse ( ) const
inline

Get a reverse iterator to the same node.

Gives a reverse iterator that will dereference (and have a handle) to the same node. Converting the endpoint iterators in a range will give a different range; for range operations, use the explicit conversions.

Definition at line 300 of file ilist_iterator.h.

◆ getTailBit()

template<class OptionsT , bool IsReverse, bool IsConst>
bool llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::getTailBit ( ) const
inline

Definition at line 370 of file ilist_iterator.h.

◆ isEnd()

template<class OptionsT , bool IsReverse, bool IsConst>
bool llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::isEnd ( ) const
inline

Check for end. Only valid if ilist_sentinel_tracking<true>.

Definition at line 367 of file ilist_iterator.h.

◆ isValid()

template<class OptionsT , bool IsReverse, bool IsConst>
bool llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::isValid ( ) const
inline

Definition at line 361 of file ilist_iterator.h.

◆ operator*()

template<class OptionsT , bool IsReverse, bool IsConst>
reference llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::operator* ( ) const
inline

◆ operator++() [1/2]

template<class OptionsT , bool IsReverse, bool IsConst>
ilist_iterator_w_bits & llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::operator++ ( )
inline

Definition at line 344 of file ilist_iterator.h.

◆ operator++() [2/2]

template<class OptionsT , bool IsReverse, bool IsConst>
ilist_iterator_w_bits llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::operator++ ( int  )
inline

Definition at line 355 of file ilist_iterator.h.

◆ operator--() [1/2]

template<class OptionsT , bool IsReverse, bool IsConst>
ilist_iterator_w_bits & llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::operator-- ( )
inline

Definition at line 338 of file ilist_iterator.h.

◆ operator--() [2/2]

template<class OptionsT , bool IsReverse, bool IsConst>
ilist_iterator_w_bits llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::operator-- ( int  )
inline

Definition at line 350 of file ilist_iterator.h.

◆ operator->()

template<class OptionsT , bool IsReverse, bool IsConst>
pointer llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::operator-> ( ) const
inline

◆ operator=()

template<class OptionsT , bool IsReverse, bool IsConst>
template<bool RHSIsConst>
std::enable_if_t< IsConst||!RHSIsConst, ilist_iterator_w_bits & > llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::operator= ( const ilist_iterator_w_bits< OptionsT, IsReverse, RHSIsConst > &  RHS)
inline

Definition at line 276 of file ilist_iterator.h.

References RHS.

◆ setHeadBit()

template<class OptionsT , bool IsReverse, bool IsConst>
void llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::setHeadBit ( bool  SetBit) const
inline

Definition at line 371 of file ilist_iterator.h.

◆ setTailBit()

template<class OptionsT , bool IsReverse, bool IsConst>
void llvm::ilist_iterator_w_bits< OptionsT, IsReverse, IsConst >::setTailBit ( bool  SetBit) const
inline

Definition at line 372 of file ilist_iterator.h.

Friends And Related Function Documentation

◆ operator!=

template<class OptionsT , bool IsReverse, bool IsConst>
bool operator!= ( const ilist_iterator_w_bits< OptionsT, IsReverse, IsConst > &  LHS,
const ilist_iterator_w_bits< OptionsT, IsReverse, IsConst > &  RHS 
)
friend

Definition at line 332 of file ilist_iterator.h.

◆ operator==

template<class OptionsT , bool IsReverse, bool IsConst>
bool operator== ( const ilist_iterator_w_bits< OptionsT, IsReverse, IsConst > &  LHS,
const ilist_iterator_w_bits< OptionsT, IsReverse, IsConst > &  RHS 
)
friend

Definition at line 328 of file ilist_iterator.h.


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