|
LLVM 24.0.0git
|
#include "llvm/ADT/ImmutableSet.h"
Classes | |
| class | Factory |
Public Types | |
| using | value_type = typename ValInfo::value_type |
| using | value_type_ref = typename ValInfo::value_type_ref |
| using | TreeTy = ImutAVLTree<ValInfo, Canonicalize> |
| using | iterator = ImutAVLValueIterator<ImmutableSet> |
Public Member Functions | |
| ImmutableSet (TreeTy *R) | |
| Constructs a set from a pointer to a tree root. | |
| bool | contains (value_type_ref V) const |
| Returns true if the set contains the specified value. | |
| bool | operator== (const ImmutableSet &RHS) const |
| Compares two sets for equality. | |
| bool | operator!= (const ImmutableSet &RHS) const |
| TreeTy * | getRoot () |
| TreeTy * | getRootWithoutRetain () const |
| bool | isEmpty () const |
| Return true if the set contains no elements. | |
| bool | isSingleton () const |
| Return true if the set contains exactly one element. | |
| iterator | begin () const |
| iterator | end () const |
| unsigned | getHeight () const |
| void | Profile (FoldingSetNodeID &ID) const |
| void | validateTree () const |
Static Public Member Functions | |
| static void | Profile (FoldingSetNodeID &ID, const ImmutableSet &S) |
Friends | |
| class | Factory |
Definition at line 1124 of file ImmutableSet.h.
| using llvm::ImmutableSet< ValT, ValInfo, Canonicalize >::iterator = ImutAVLValueIterator<ImmutableSet> |
Definition at line 1262 of file ImmutableSet.h.
| using llvm::ImmutableSet< ValT, ValInfo, Canonicalize >::TreeTy = ImutAVLTree<ValInfo, Canonicalize> |
Definition at line 1128 of file ImmutableSet.h.
| using llvm::ImmutableSet< ValT, ValInfo, Canonicalize >::value_type = typename ValInfo::value_type |
Definition at line 1126 of file ImmutableSet.h.
| using llvm::ImmutableSet< ValT, ValInfo, Canonicalize >::value_type_ref = typename ValInfo::value_type_ref |
Definition at line 1127 of file ImmutableSet.h.
|
inlineexplicit |
Constructs a set from a pointer to a tree root.
In general one should use a Factory object to create sets instead of directly invoking the constructor, but there are cases where make this constructor public is useful.
Definition at line 1138 of file ImmutableSet.h.
Referenced by llvm::ImmutableSet< ValT, ValInfo, Canonicalize >::Factory::add(), llvm::ImmutableSet< ValT, ValInfo, Canonicalize >::Factory::getEmptySet(), operator!=(), operator==(), Profile(), llvm::ImmutableSet< ValT, ValInfo, Canonicalize >::Factory::remove(), and llvm::ImmutableSet< ValT, ValInfo, Canonicalize >::Factory::unionSets().
|
inline |
Definition at line 1264 of file ImmutableSet.h.
|
inline |
Returns true if the set contains the specified value.
Definition at line 1220 of file ImmutableSet.h.
References V.
|
inline |
Definition at line 1265 of file ImmutableSet.h.
|
inline |
Definition at line 1271 of file ImmutableSet.h.
Referenced by isSingleton().
|
inline |
Definition at line 1244 of file ImmutableSet.h.
|
inline |
Definition at line 1249 of file ImmutableSet.h.
|
inline |
Return true if the set contains no elements.
Definition at line 1252 of file ImmutableSet.h.
|
inline |
Return true if the set contains exactly one element.
This method runs in constant time.
Definition at line 1256 of file ImmutableSet.h.
References getHeight().
|
inline |
Definition at line 1236 of file ImmutableSet.h.
References ImmutableSet(), and RHS.
|
inline |
Compares two sets for equality.
For a canonicalizing factory, sets with equal contents share the same tree, so this is an O(1) pointer comparison (like ImmutableList); only sets created by the same factory may be compared. Otherwise it is a structural comparison.
Definition at line 1228 of file ImmutableSet.h.
References ImmutableSet(), and RHS.
|
inline |
|
inlinestatic |
Definition at line 1273 of file ImmutableSet.h.
References ImmutableSet().
|
inline |
Definition at line 1283 of file ImmutableSet.h.
|
friend |
Definition at line 1217 of file ImmutableSet.h.