LLVM 20.0.0git
Public Member Functions | List of all members
llvm::FoldingSet< T > Class Template Reference

FoldingSet - This template class is used to instantiate a specialized implementation of the folding set to the node class T. More...

#include "llvm/ADT/FoldingSet.h"

Inheritance diagram for llvm::FoldingSet< T >:
Inheritance graph
[legend]

Public Member Functions

 FoldingSet (unsigned Log2InitSize=6)
 
 FoldingSet (FoldingSet &&Arg)=default
 
FoldingSetoperator= (FoldingSet &&RHS)=default
 
- Public Member Functions inherited from llvm::FoldingSetImpl< FoldingSet< T >, T >
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
bucket_iterator bucket_begin (unsigned hash)
 
bucket_iterator bucket_end (unsigned hash)
 
void reserve (unsigned EltCount)
 reserve - Increase the number of buckets such that adding the EltCount-th node won't cause a rebucket operation.
 
bool RemoveNode (T *N)
 RemoveNode - Remove a node from the folding set, returning true if one was removed or false if the node was not in the folding set.
 
TGetOrInsertNode (T *N)
 GetOrInsertNode - If there is an existing simple Node exactly equal to the specified node, return it.
 
TFindNodeOrInsertPos (const FoldingSetNodeID &ID, void *&InsertPos)
 FindNodeOrInsertPos - Look up the node specified by ID.
 
void InsertNode (T *N, void *InsertPos)
 InsertNode - Insert the specified node into the folding set, knowing that it is not already in the folding set.
 
void InsertNode (T *N)
 InsertNode - Insert the specified node into the folding set, knowing that it is not already in the folding set.
 
- Public Member Functions inherited from llvm::FoldingSetBase
void clear ()
 clear - Remove all nodes from the folding set.
 
unsigned size () const
 size - Returns the number of nodes in the folding set.
 
bool empty () const
 empty - Returns true if there are no nodes in the folding set.
 
unsigned capacity ()
 capacity - Returns the number of nodes permitted in the folding set before a rebucket operation is performed.
 

Additional Inherited Members

- Public Types inherited from llvm::FoldingSetImpl< FoldingSet< T >, T >
using iterator = FoldingSetIterator< T >
 
using const_iterator = FoldingSetIterator< const T >
 
using bucket_iterator = FoldingSetBucketIterator< T >
 
- Protected Member Functions inherited from llvm::FoldingSetImpl< FoldingSet< T >, T >
 FoldingSetImpl (unsigned Log2InitSize)
 
 FoldingSetImpl (FoldingSetImpl &&Arg)=default
 
FoldingSetImploperator= (FoldingSetImpl &&RHS)=default
 
 ~FoldingSetImpl ()=default
 
- Protected Member Functions inherited from llvm::FoldingSetBase
 FoldingSetBase (unsigned Log2InitSize=6)
 
 FoldingSetBase (FoldingSetBase &&Arg)
 
FoldingSetBaseoperator= (FoldingSetBase &&RHS)
 
 ~FoldingSetBase ()
 
void reserve (unsigned EltCount, const FoldingSetInfo &Info)
 reserve - Increase the number of buckets such that adding the EltCount-th node won't cause a rebucket operation.
 
bool RemoveNode (Node *N)
 RemoveNode - Remove a node from the folding set, returning true if one was removed or false if the node was not in the folding set.
 
NodeGetOrInsertNode (Node *N, const FoldingSetInfo &Info)
 GetOrInsertNode - If there is an existing simple Node exactly equal to the specified node, return it.
 
NodeFindNodeOrInsertPos (const FoldingSetNodeID &ID, void *&InsertPos, const FoldingSetInfo &Info)
 FindNodeOrInsertPos - Look up the node specified by ID.
 
void InsertNode (Node *N, void *InsertPos, const FoldingSetInfo &Info)
 InsertNode - Insert the specified node into the folding set, knowing that it is not already in the folding set.
 
- Protected Attributes inherited from llvm::FoldingSetBase
void ** Buckets
 Buckets - Array of bucket chains.
 
unsigned NumBuckets
 NumBuckets - Length of the Buckets array. Always a power of 2.
 
unsigned NumNodes
 NumNodes - Number of nodes in the folding set.
 

Detailed Description

template<class T>
class llvm::FoldingSet< T >

FoldingSet - This template class is used to instantiate a specialized implementation of the folding set to the node class T.

T must be a subclass of FoldingSetNode and implement a Profile function.

Note that this set type is movable and move-assignable. However, its moved-from state is not a valid state for anything other than move-assigning and destroying. This is primarily to enable movable APIs that incorporate these objects.

Definition at line 536 of file FoldingSet.h.

Constructor & Destructor Documentation

◆ FoldingSet() [1/2]

template<class T >
llvm::FoldingSet< T >::FoldingSet ( unsigned  Log2InitSize = 6)
inlineexplicit

Definition at line 573 of file FoldingSet.h.

◆ FoldingSet() [2/2]

template<class T >
llvm::FoldingSet< T >::FoldingSet ( FoldingSet< T > &&  Arg)
default

Member Function Documentation

◆ operator=()

template<class T >
FoldingSet & llvm::FoldingSet< T >::operator= ( FoldingSet< T > &&  RHS)
default

The documentation for this class was generated from the following file: