LLVM 24.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"

Inheritance diagram for llvm::FoldingSetNodeIDRef:
[legend]

Public Member Functions

unsigned computeHash () const
unsigned computeStableHash () const
Public Member Functions inherited from llvm::ArrayRef< unsigned >
 ArrayRef ()=default
 Construct an empty ArrayRef.
iterator begin () const
iterator end () const
reverse_iterator rbegin () const
reverse_iterator rend () const
bool empty () const
 Check if the array is empty.
const unsigneddata () const
size_t size () const
 Get the array size.
const unsignedfront () const
 Get the first element.
const unsignedback () const
 Get the last element.
const unsignedconsume_front ()
 consume_front() - Returns the first element and drops it from ArrayRef.
const unsignedconsume_back ()
 consume_back() - Returns the last element and drops it from ArrayRef.
MutableArrayRef< unsignedcopy (Allocator &A)
bool equals (ArrayRef RHS) const
 Check for element-wise equality.
ArrayRef< unsignedslice (size_t N, size_t M) const
 slice(n, m) - Chop off the first N elements of the array, and keep M elements in the array.
ArrayRef< unsigneddrop_front (size_t N=1) const
 Drop the first N elements of the array.
ArrayRef< unsigneddrop_back (size_t N=1) const
 Drop the last N elements of the array.
ArrayRef< unsigneddrop_while (PredicateT Pred) const
 Return a copy of *this with the first N elements satisfying the given predicate removed.
ArrayRef< unsigneddrop_until (PredicateT Pred) const
 Return a copy of *this with the first N elements not satisfying the given predicate removed.
ArrayRef< unsignedtake_front (size_t N=1) const
 Return a copy of *this with only the first N elements.
ArrayRef< unsignedtake_back (size_t N=1) const
 Return a copy of *this with only the last N elements.
ArrayRef< unsignedtake_while (PredicateT Pred) const
 Return the first N elements of this Array that satisfy the given predicate.
ArrayRef< unsignedtake_until (PredicateT Pred) const
 Return the first N elements of this Array that don't satisfy the given predicate.
const unsignedoperator[] (size_t Index) const
std::enable_if_t< std::is_same< U, unsigned >::value, ArrayRef< unsigned > > & operator= (U &&Temporary)=delete
 Disallow accidental assignment from a temporary.
std::vector< unsignedvec () const
 operator std::vector< unsigned > () const

Static Public Attributes

static constexpr unsigned NotAHash = 0

Additional Inherited Members

Public Types inherited from llvm::ArrayRef< unsigned >
using value_type
using pointer
using const_pointer
using reference
using const_reference
using iterator
using const_iterator
using reverse_iterator
using const_reverse_iterator
using size_type
using difference_type

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 123 of file FoldingSet.h.

Member Function Documentation

◆ computeHash()

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

Definition at line 133 of file FoldingSet.h.

References llvm::hash_value(), and NotAHash.

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

◆ computeStableHash()

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

Member Data Documentation

◆ NotAHash

unsigned llvm::FoldingSetNodeIDRef::NotAHash = 0
staticconstexpr

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