|
LLVM
10.0.0
|
ImmutableList - This class represents an immutable (functional) list. More...
#include "llvm/ADT/ImmutableList.h"
Classes | |
| class | iterator |
Public Types | |
| using | value_type = T |
| using | Factory = ImmutableListFactory< T > |
Public Member Functions | |
| ImmutableList (const ImmutableListImpl< T > *x=nullptr) | |
| const ImmutableListImpl< T > * | getInternalPointer () const |
| iterator | begin () const |
| begin - Returns an iterator referring to the head of the list, or an iterator denoting the end of the list if the list is empty. More... | |
| iterator | end () const |
| end - Returns an iterator denoting the end of the list. More... | |
| bool | isEmpty () const |
| isEmpty - Returns true if the list is empty. More... | |
| bool | contains (const T &V) const |
| bool | isEqual (const ImmutableList &L) const |
| isEqual - Returns true if two lists are equal. More... | |
| bool | operator== (const ImmutableList &L) const |
| const T & | getHead () const |
| getHead - Returns the head of the list. More... | |
| ImmutableList | getTail () const |
| getTail - Returns the tail of the list, which is another (possibly empty) ImmutableList. More... | |
| void | Profile (FoldingSetNodeID &ID) const |
ImmutableList - This class represents an immutable (functional) list.
It is implemented as a smart pointer (wraps ImmutableListImpl), so it it is intended to always be copied by value as if it were a pointer. This interface matches ImmutableSet and ImmutableMap. ImmutableList objects should almost never be created directly, and instead should be created by ImmutableListFactory objects that manage the lifetime of a group of lists. When the factory object is reclaimed, all lists created by that factory are released as well.
Definition at line 64 of file ImmutableList.h.
| using llvm::ImmutableList< T >::Factory = ImmutableListFactory<T> |
Definition at line 67 of file ImmutableList.h.
| using llvm::ImmutableList< T >::value_type = T |
Definition at line 66 of file ImmutableList.h.
|
inline |
Definition at line 79 of file ImmutableList.h.
|
inline |
begin - Returns an iterator referring to the head of the list, or an iterator denoting the end of the list if the list is empty.
Definition at line 105 of file ImmutableList.h.
|
inline |
Definition at line 114 of file ImmutableList.h.
References llvm::sys::path::begin(), E, llvm::sys::path::end(), and I.
|
inline |
end - Returns an iterator denoting the end of the list.
This iterator does not refer to a valid list element.
Definition at line 109 of file ImmutableList.h.
|
inline |
getHead - Returns the head of the list.
Definition at line 132 of file ImmutableList.h.
References assert(), and llvm::ImmutableListImpl< T >::getHead().
|
inline |
Definition at line 81 of file ImmutableList.h.
References X.
Referenced by llvm::ImmutableListFactory< T >::concat(), and llvm::DenseMapInfo< ImmutableList< T > >::getHashValue().
|
inline |
getTail - Returns the tail of the list, which is another (possibly empty) ImmutableList.
Definition at line 139 of file ImmutableList.h.
References llvm::ImmutableListImpl< T >::getTail().
|
inline |
isEmpty - Returns true if the list is empty.
Definition at line 112 of file ImmutableList.h.
References X.
|
inline |
isEqual - Returns true if two lists are equal.
Because all lists created from the same ImmutableListFactory are uniqued, this has O(1) complexity because it the contents of the list do not need to be compared. Note that you should only compare two lists created from the same ImmutableListFactory.
Definition at line 127 of file ImmutableList.h.
|
inline |
Definition at line 129 of file ImmutableList.h.
References llvm::isEqual().
|
inline |
Definition at line 143 of file ImmutableList.h.
References llvm::FoldingSetNodeID::AddPointer(), and Allocator.
1.8.13