LLVM 24.0.0git
llvm::FoldingSetNodeID Class Reference

This class is used to gather all the unique data bits of a node. More...

#include "llvm/ADT/FoldingSet.h"

Public Member Functions

 FoldingSetNodeID ()=default
 FoldingSetNodeID (FoldingSetNodeIDRef Ref)
void AddPointer (const void *Ptr)
 Add* - Add various data types to Bit data.
void AddInteger (signed I)
void AddInteger (unsigned I)
void AddInteger (long I)
void AddInteger (unsigned long I)
void AddInteger (long long I)
void AddInteger (unsigned long long I)
void AddBoolean (bool B)
LLVM_ABI void AddString (StringRef String)
LLVM_ABI void AddNodeID (const FoldingSetNodeID &ID)
template<typename T>
void Add (const T &x)
void clear ()
 Clear the accumulated profile, allowing this FoldingSetNodeID object to be used to compute a new profile.
FoldingSetNodeIDRef getRef () const
 The accumulated profile, valid until this object is next modified.
unsigned computeHash () const
unsigned computeStableHash () const
 operator FoldingSetNodeIDRef () const
LLVM_ABI FoldingSetNodeIDRef Intern (BumpPtrAllocator &Allocator) const
 Copy this node's data to a memory region allocated from the given allocator and return a FoldingSetNodeIDRef describing the interned data.

Detailed Description

This class is used to gather all the unique data bits of a node.

When all the bits are gathered this class is used to produce a hash value for the node.

Definition at line 162 of file FoldingSet.h.

Constructor & Destructor Documentation

◆ FoldingSetNodeID() [1/2]

llvm::FoldingSetNodeID::FoldingSetNodeID ( )
default

Referenced by AddNodeID().

◆ FoldingSetNodeID() [2/2]

llvm::FoldingSetNodeID::FoldingSetNodeID ( FoldingSetNodeIDRef Ref)
inline

Definition at line 178 of file FoldingSet.h.

References llvm::Ref.

Member Function Documentation

◆ Add()

template<typename T>
void llvm::FoldingSetNodeID::Add ( const T & x)
inline

Definition at line 200 of file FoldingSet.h.

References llvm::DefaultFoldingSetTrait< T >::Profile(), and T.

Referenced by llvm::APFloat::Profile().

◆ AddBoolean()

void llvm::FoldingSetNodeID::AddBoolean ( bool B)
inline

Definition at line 196 of file FoldingSet.h.

References AddInteger(), and B().

◆ AddInteger() [1/6]

void llvm::FoldingSetNodeID::AddInteger ( long I)
inline

Definition at line 192 of file FoldingSet.h.

References I.

◆ AddInteger() [2/6]

void llvm::FoldingSetNodeID::AddInteger ( long long I)
inline

Definition at line 194 of file FoldingSet.h.

References I.

◆ AddInteger() [3/6]

◆ AddInteger() [4/6]

void llvm::FoldingSetNodeID::AddInteger ( unsigned I)
inline

Definition at line 191 of file FoldingSet.h.

References I.

◆ AddInteger() [5/6]

void llvm::FoldingSetNodeID::AddInteger ( unsigned long I)
inline

Definition at line 193 of file FoldingSet.h.

References I.

◆ AddInteger() [6/6]

void llvm::FoldingSetNodeID::AddInteger ( unsigned long long I)
inline

Definition at line 195 of file FoldingSet.h.

References I.

◆ AddNodeID()

void FoldingSetNodeID::AddNodeID ( const FoldingSetNodeID & ID)

Definition at line 100 of file FoldingSet.cpp.

References FoldingSetNodeID().

◆ AddPointer()

void llvm::FoldingSetNodeID::AddPointer ( const void * Ptr)
inline

Add* - Add various data types to Bit data.

Definition at line 181 of file FoldingSet.h.

References AddInteger().

Referenced by node_hash().

◆ AddString()

void FoldingSetNodeID::AddString ( StringRef String)

◆ clear()

void llvm::FoldingSetNodeID::clear ( )
inline

Clear the accumulated profile, allowing this FoldingSetNodeID object to be used to compute a new profile.

Definition at line 206 of file FoldingSet.h.

◆ computeHash()

unsigned llvm::FoldingSetNodeID::computeHash ( ) const
inline

◆ computeStableHash()

unsigned llvm::FoldingSetNodeID::computeStableHash ( ) const
inline

Definition at line 218 of file FoldingSet.h.

References llvm::FoldingSetNodeIDRef::computeStableHash(), and getRef().

◆ getRef()

FoldingSetNodeIDRef llvm::FoldingSetNodeID::getRef ( ) const
inline

The accumulated profile, valid until this object is next modified.

Definition at line 209 of file FoldingSet.h.

Referenced by computeHash(), and computeStableHash().

◆ Intern()

FoldingSetNodeIDRef FoldingSetNodeID::Intern ( BumpPtrAllocator & Allocator) const

Copy this node's data to a memory region allocated from the given allocator and return a FoldingSetNodeIDRef describing the interned data.

Definition at line 105 of file FoldingSet.cpp.

References llvm::uninitialized_copy().

◆ operator FoldingSetNodeIDRef()

llvm::FoldingSetNodeID::operator FoldingSetNodeIDRef ( ) const
inline

Definition at line 220 of file FoldingSet.h.


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