An implementation detail that lets us share code between FoldingSet and ContextualFoldingSet.
Synopsis
Declared in <llvm/ADT/FoldingSet.h>
template<
class T,
class Trait = FoldingSetTrait<T>>
class FoldingSetImpl
: public FoldingSetBase
, public Trait::ContextStorage
Base Classes
Name |
Description |
Non‐templated base class for FoldingSet and ContextualFoldingSet, holding the memory management and probing that does not depend on the node type. |
|
|
Types
Name |
Description |
Empty stub of HandleBase used when ABI‐breaking checks are disabled. |
|
This class is used to maintain node state in a folding set. |
Type Aliases
Name |
Description |
Const iterator over the non‐null nodes stored in the folding set. |
|
Iterator over the non‐null nodes stored in the folding set. |
Member Functions
Name |
Description |
|
Move‐construct a folding set from |
|
Construct an empty folding set with 2ˆLog2InitSize buckets. |
|
Construct a contextual folding set with fixed |
|
Destroy the folding set; nodes are not deleted by this destructor. |
Move‐assign a folding set, leaving |
|
Look up the node specified by ID. If it exists, return it. If not, return the insertion token that will make insertion faster. |
|
If there is an existing node exactly equal to the specified node, return it. Otherwise, insert 'N' and return it instead. |
|
Insert the specified node into the folding set, knowing that it is not already in the folding set. |
|
Insert the specified node into the folding set, knowing that it is not already in the folding set. InsertPos must be obtained from FindNodeOrInsertPos. |
|
Remove a node from the folding set, returning true if one was removed or false if the node was not in the folding set. |
|
Return an iterator to the first non‐null node in the folding set. |
|
Return a const iterator to the first non‐null node in the folding set. |
|
Remove all nodes from the folding set. |
|
Returns true if there are no nodes in the folding set. |
|
Return an iterator past the last node in the folding set. |
|
Return a const iterator past the last node in the folding set. |
|
No‐op when ABI‐breaking checks are disabled. |
|
Grow the number of buckets so that we can hold at least |
|
Returns the number of nodes in the folding set. |
Protected Types
Name |
Description |
Derived‐class hooks that compute folding properties for a node. |
Protected Member Functions
Name |
Description |
Move‐assign a folding set, leaving |
|
Look up the node specified by ID. If it exists, return it. If not, return the insertion token that will make insertion faster. |
|
If there is an existing node exactly equal to the node |
|
Insert |
|
Remove a node from the folding set, returning true if one was removed or false if the node was not in the folding set. |
Protected Data Members
Name |
Description |
Array of node pointers; a null entry marks an empty slot. |
|
Length of the Buckets array. Always a power of 2. |
|
Number of nodes in the folding set. |
Created with MrDocs