LLVM 23.0.0git
llvm::FoldingSetNodeIDRef Class Reference

This class describes a reference to an interned FoldingSetNodeID, which can be a useful to store node id data rather than using plain FoldingSetNodeIDs, since the 32-element SmallVector is often much larger than necessary, and the possibility of heap allocation means it requires a non-trivial destructor call. More...

#include "llvm/ADT/FoldingSet.h"

Public Member Functions

 FoldingSetNodeIDRef ()=default
 FoldingSetNodeIDRef (const unsigned *D, size_t S)
unsigned ComputeHash () const
unsigned computeStableHash () const
LLVM_ABI bool operator== (FoldingSetNodeIDRef) const
bool operator!= (FoldingSetNodeIDRef RHS) const
LLVM_ABI bool operator< (FoldingSetNodeIDRef) const
 Used to compare the "ordering" of two nodes as defined by the profiled bits and their ordering defined by memcmp().
const unsignedgetData () const
size_t getSize () const

Detailed Description

This class describes a reference to an interned FoldingSetNodeID, which can be a useful to store node id data rather than using plain FoldingSetNodeIDs, since the 32-element SmallVector is often much larger than necessary, and the possibility of heap allocation means it requires a non-trivial destructor call.

Definition at line 171 of file FoldingSet.h.

Constructor & Destructor Documentation

◆ FoldingSetNodeIDRef() [1/2]

llvm::FoldingSetNodeIDRef::FoldingSetNodeIDRef ( )
default

Referenced by operator!=(), operator<(), and operator==().

◆ FoldingSetNodeIDRef() [2/2]

llvm::FoldingSetNodeIDRef::FoldingSetNodeIDRef ( const unsigned * D,
size_t S )
inline

Definition at line 177 of file FoldingSet.h.

References D().

Member Function Documentation

◆ ComputeHash()

unsigned llvm::FoldingSetNodeIDRef::ComputeHash ( ) const
inline

Definition at line 181 of file FoldingSet.h.

References llvm::hash_combine_range().

Referenced by llvm::FoldingSetNodeID::ComputeHash().

◆ computeStableHash()

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

Definition at line 187 of file FoldingSet.h.

References llvm::xxh3_64bits().

Referenced by llvm::FoldingSetNodeID::computeStableHash().

◆ getData()

const unsigned * llvm::FoldingSetNodeIDRef::getData ( ) const
inline

Definition at line 200 of file FoldingSet.h.

◆ getSize()

size_t llvm::FoldingSetNodeIDRef::getSize ( ) const
inline

Definition at line 201 of file FoldingSet.h.

◆ operator!=()

bool llvm::FoldingSetNodeIDRef::operator!= ( FoldingSetNodeIDRef RHS) const
inline

Definition at line 194 of file FoldingSet.h.

References FoldingSetNodeIDRef(), and RHS.

◆ operator<()

bool FoldingSetNodeIDRef::operator< ( FoldingSetNodeIDRef RHS) const

Used to compare the "ordering" of two nodes as defined by the profiled bits and their ordering defined by memcmp().

Definition at line 35 of file FoldingSet.cpp.

References FoldingSetNodeIDRef().

◆ operator==()

bool FoldingSetNodeIDRef::operator== ( FoldingSetNodeIDRef RHS) const

Definition at line 28 of file FoldingSet.cpp.

References FoldingSetNodeIDRef().


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