|
LLVM 24.0.0git
|
#include "llvm/ADT/ImmutableMap.h"
Public Member Functions | |
| Factory ()=default | |
| Factory (BumpPtrAllocator &Alloc) | |
| Factory (const Factory &)=delete | |
| Factory & | operator= (const Factory &)=delete |
| ImmutableMap | getEmptyMap () |
| ImmutableMap | add (ImmutableMap Old, key_type_ref K, data_type_ref D) |
| template<typename CombineFn> | |
| ImmutableMap | mergeWith (ImmutableMap A, ImmutableMap B, CombineFn Combine, bool KeepUnmatched, bool SkipShared=false) |
Merges A and B in a single traversal (see ImutAVLFactory::mergeTrees), sharing subtrees the two maps do not overlap. | |
| ImmutableMap | remove (ImmutableMap Old, key_type_ref K) |
| TreeTy::Factory * | getTreeFactory () const |
Definition at line 84 of file ImmutableMap.h.
|
default |
Referenced by Factory(), and operator=().
|
inline |
Definition at line 90 of file ImmutableMap.h.
References llvm::Alloc.
|
delete |
References Factory().
|
inlinenodiscard |
Definition at line 97 of file ImmutableMap.h.
References D(), llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::ImmutableMap(), llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Root, and T.
|
inline |
Definition at line 95 of file ImmutableMap.h.
References llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::ImmutableMap().
|
inline |
Definition at line 135 of file ImmutableMap.h.
|
inlinenodiscard |
Merges A and B in a single traversal (see ImutAVLFactory::mergeTrees), sharing subtrees the two maps do not overlap.
Combine(AElem, BElem) yields the stored element for a key; KeepUnmatched governs keys unique to one side. SkipShared returns a pointer-identical subtree unchanged in O(1); only pass true when the merge is idempotent (Combine(a, a) == a, e.g. a lattice join). This is more efficient than repeatedly adding B's entries to A when B is large. Only valid for non-canonicalizing factories (the bulk path does not canonicalize the nodes it creates). Does not short-circuit equal/empty operands or reorder by size; callers wanting those apply them first.
Definition at line 118 of file ImmutableMap.h.
References A(), B(), Combine, and llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::ImmutableMap().
|
delete |
References Factory().
|
inlinenodiscard |
Definition at line 127 of file ImmutableMap.h.
References llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::ImmutableMap(), llvm::ImmutableMap< KeyT, ValT, ValInfo, Canonicalize >::Root, and T.