class ImmutableList
Declaration
template <typename T>
class ImmutableList { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/ADT/ImmutableList.h:64
Templates
- T
Method Overview
- public ImmutableList<T>(const ImmutableListImpl<T> * x = nullptr)
- public void Profile(llvm::FoldingSetNodeID & ID) const
- public llvm::ImmutableList::iterator begin() const
- public bool contains(const T & V) const
- public llvm::ImmutableList::iterator end() const
- public const T & getHead() const
- public const ImmutableListImpl<T> * getInternalPointer() const
- public ImmutableList<T> getTail() const
- public bool isEmpty() const
- public bool isEqual(const ImmutableList<T> & L) const
Methods
¶ImmutableList<T>(
const ImmutableListImpl<T>* x = nullptr)
ImmutableList<T>(
const ImmutableListImpl<T>* x = nullptr)
Declared at: llvm/include/llvm/ADT/ImmutableList.h:79
Parameters
- const ImmutableListImpl<T>* x = nullptr
¶void Profile(llvm::FoldingSetNodeID& ID) const
void Profile(llvm::FoldingSetNodeID& ID) const
Declared at: llvm/include/llvm/ADT/ImmutableList.h:143
Parameters
¶llvm::ImmutableList::iterator begin() const
llvm::ImmutableList::iterator begin() const
Description
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.
Declared at: llvm/include/llvm/ADT/ImmutableList.h:105
¶bool contains(const T& V) const
bool contains(const T& V) const
Declared at: llvm/include/llvm/ADT/ImmutableList.h:114
Parameters
- const T& V
¶llvm::ImmutableList::iterator end() const
llvm::ImmutableList::iterator end() const
Description
end - Returns an iterator denoting the end of the list. This iterator does not refer to a valid list element.
Declared at: llvm/include/llvm/ADT/ImmutableList.h:109
¶const T& getHead() const
const T& getHead() const
Description
getHead - Returns the head of the list.
Declared at: llvm/include/llvm/ADT/ImmutableList.h:132
¶const ImmutableListImpl<T>* getInternalPointer()
const
const ImmutableListImpl<T>* getInternalPointer()
const
Declared at: llvm/include/llvm/ADT/ImmutableList.h:81
¶ImmutableList<T> getTail() const
ImmutableList<T> getTail() const
Description
getTail - Returns the tail of the list, which is another (possibly empty) ImmutableList.
Declared at: llvm/include/llvm/ADT/ImmutableList.h:139
¶bool isEmpty() const
bool isEmpty() const
Description
isEmpty - Returns true if the list is empty.
Declared at: llvm/include/llvm/ADT/ImmutableList.h:112
¶bool isEqual(const ImmutableList<T>& L) const
bool isEqual(const ImmutableList<T>& L) const
Description
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.
Declared at: llvm/include/llvm/ADT/ImmutableList.h:127
Parameters
- const ImmutableList<T>& L