|
LLVM 24.0.0git
|
#include "llvm/ADT/ImmutableMap.h"
Classes | |
| class | Factory |
| class | iterator |
Public Types | |
| using | value_type = typename ValInfo::value_type |
| using | value_type_ref = typename ValInfo::value_type_ref |
| using | key_type = typename ValInfo::key_type |
| using | key_type_ref = typename ValInfo::key_type_ref |
| using | data_type = typename ValInfo::data_type |
| using | data_type_ref = typename ValInfo::data_type_ref |
| using | TreeTy = ImutAVLTree<ValInfo, Canonicalize> |
Public Member Functions | |
| ImmutableMap (const TreeTy *R) | |
| Constructs a map from a pointer to a tree root. | |
| bool | contains (key_type_ref K) const |
| bool | operator== (const ImmutableMap &RHS) const |
| Compares two maps for equality. | |
| bool | operator!= (const ImmutableMap &RHS) const |
| TreeTy * | getRoot () const |
| TreeTy * | getRootWithoutRetain () const |
| void | manualRetain () |
| void | manualRelease () |
| bool | isEmpty () const |
| void | verify () const |
| iterator | begin () const |
| iterator | end () const |
| data_type * | lookup (key_type_ref K) const |
| value_type * | getMaxElement () const |
| Returns the <key,value> pair in the ImmutableMap for which key is the highest in the ordering of keys in the map. | |
| unsigned | getHeight () const |
| void | Profile (FoldingSetNodeID &ID) const |
Static Public Member Functions | |
| static void | Profile (FoldingSetNodeID &ID, const ImmutableMap &M) |
Protected Attributes | |
| IntrusiveRefCntPtr< TreeTy > | Root |
Definition at line 65 of file ImmutableMap.h.
| using llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::data_type = typename ValInfo::data_type |
Definition at line 71 of file ImmutableMap.h.
| using llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::data_type_ref = typename ValInfo::data_type_ref |
Definition at line 72 of file ImmutableMap.h.
| using llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::key_type = typename ValInfo::key_type |
Definition at line 69 of file ImmutableMap.h.
| using llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::key_type_ref = typename ValInfo::key_type_ref |
Definition at line 70 of file ImmutableMap.h.
| using llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::TreeTy = ImutAVLTree<ValInfo, Canonicalize> |
Definition at line 73 of file ImmutableMap.h.
| using llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::value_type = typename ValInfo::value_type |
Definition at line 67 of file ImmutableMap.h.
| using llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::value_type_ref = typename ValInfo::value_type_ref |
Definition at line 68 of file ImmutableMap.h.
|
inlineexplicit |
Constructs a map from a pointer to a tree root.
In general one should use a Factory object to create maps instead of directly invoking the constructor, but there are cases where make this constructor public is useful.
Definition at line 83 of file ImmutableMap.h.
References Root.
Referenced by llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Factory::add(), llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Factory::filter(), llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Factory::getEmptyMap(), llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Factory::mergeWith(), operator!=(), operator==(), Profile(), and llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Factory::remove().
|
inlinenodiscard |
Definition at line 215 of file ImmutableMap.h.
References Root.
|
inlinenodiscard |
Definition at line 152 of file ImmutableMap.h.
References Root.
|
inlinenodiscard |
Definition at line 216 of file ImmutableMap.h.
|
inlinenodiscard |
Definition at line 238 of file ImmutableMap.h.
References Root.
|
inlinenodiscard |
Returns the <key,value> pair in the ImmutableMap for which key is the highest in the ordering of keys in the map.
This method returns NULL if the map is empty.
Definition at line 230 of file ImmutableMap.h.
References getValue(), and Root.
|
inlinenodiscard |
Definition at line 176 of file ImmutableMap.h.
References Root.
|
inlinenodiscard |
Definition at line 181 of file ImmutableMap.h.
References Root.
|
inlinenodiscard |
Definition at line 191 of file ImmutableMap.h.
References Root.
|
inlinenodiscard |
Definition at line 218 of file ImmutableMap.h.
|
inline |
Definition at line 187 of file ImmutableMap.h.
References Root.
|
inline |
Definition at line 183 of file ImmutableMap.h.
References Root.
|
inlinenodiscard |
Definition at line 168 of file ImmutableMap.h.
References ImmutableMap(), RHS, and Root.
|
inlinenodiscard |
Compares two maps for equality.
For a canonicalizing factory, maps with equal contents share the same tree, so this is an O(1) pointer comparison (like ImmutableList); only maps created by the same factory may be compared. Otherwise it is a structural comparison.
Definition at line 160 of file ImmutableMap.h.
References ImmutableMap(), RHS, and Root.
|
inline |
Definition at line 246 of file ImmutableMap.h.
References Profile.
|
inlinestatic |
Definition at line 242 of file ImmutableMap.h.
References ImmutableMap().
|
inline |
Definition at line 198 of file ImmutableMap.h.
References Root.
|
protected |
Definition at line 76 of file ImmutableMap.h.
Referenced by llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Factory::add(), begin(), contains(), llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Factory::filter(), getHeight(), getMaxElement(), getRoot(), getRootWithoutRetain(), ImmutableMap(), isEmpty(), lookup(), manualRelease(), manualRetain(), operator!=(), operator==(), llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Factory::remove(), and verify().