llvm::ImmutableList

Immutable (functional) list of elements of type T.

Synopsis

Declared in <llvm/ADT/ImmutableList.h>

template<typename T>
class ImmutableList;

Description

This class represents an immutable (functional) list. It is implemented as a smart pointer (wraps ImmutableListImpl), so 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.

Types

NameDescription
iterator Forward iterator over the elements of an ImmutableList.

Type Aliases

NameDescription
Factory Factory type that allocates and uniques lists of this element type.
value_type Element type stored in the list.

Member Functions

NameDescription
ImmutableList [constructor]Wrap internal node pointer x; normally only called by the factory.
Profile Profile this list's identity into folding-set ID ID.
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.
contains Return true if the list contains an element equal to V.
end Returns an iterator denoting the end of the list. This iterator does not refer to a valid list element.
getHead Returns the head of the list.
getInternalPointer Return the underlying cons-cell pointer used for uniquing and identity.
getTail Returns the tail of the list, which is another (possibly empty) ImmutableList.
isEmpty Returns true if the list is empty.
isEqual Return true if this list and L refer to the same uniqued identity.
operator== Return true if this list is equal to L (same uniqued identity).