forked from OSchip/llvm-project
parent
02341b2023
commit
b8640b6d73
|
@ -195,11 +195,11 @@ protected:
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
/// FoldingSetTrait - This trait class is used to define behavior of how
|
/// FoldingSetTrait - This trait class is used to define behavior of how
|
||||||
/// to "profile" (in the FoldingSet parlance) an object of a given type.
|
/// to "profile" (in the FoldingSet parlance) an object of a given type.
|
||||||
/// The default behavior is to invoke a 'Profile' method on an object, but
|
/// The default behavior is to invoke a 'Profile' method on an object, but
|
||||||
/// through template specialization the behavior can be tailored for specific
|
/// through template specialization the behavior can be tailored for specific
|
||||||
/// types. Combined with the FoldingSetNodeWrapper class, one can add objects
|
/// types. Combined with the FoldingSetNodeWrapper class, one can add objects
|
||||||
/// to FoldingSets that were not originally designed to have that behavior.
|
/// to FoldingSets that were not originally designed to have that behavior.
|
||||||
///
|
///
|
||||||
template<typename T> struct FoldingSetTrait {
|
template<typename T> struct FoldingSetTrait {
|
||||||
static inline void Profile(const T& X, FoldingSetNodeID& ID) { X.Profile(ID);}
|
static inline void Profile(const T& X, FoldingSetNodeID& ID) { X.Profile(ID);}
|
||||||
|
@ -259,11 +259,11 @@ public:
|
||||||
inline void Add(const T& x) { FoldingSetTrait<T>::Profile(x, *this); }
|
inline void Add(const T& x) { FoldingSetTrait<T>::Profile(x, *this); }
|
||||||
|
|
||||||
/// clear - Clear the accumulated profile, allowing this FoldingSetNodeID
|
/// clear - Clear the accumulated profile, allowing this FoldingSetNodeID
|
||||||
/// object to be used to compute a new profile.
|
/// object to be used to compute a new profile.
|
||||||
inline void clear() { Bits.clear(); }
|
inline void clear() { Bits.clear(); }
|
||||||
|
|
||||||
/// ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used
|
/// ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used
|
||||||
/// to lookup the node in the FoldingSetImpl.
|
/// to lookup the node in the FoldingSetImpl.
|
||||||
unsigned ComputeHash() const;
|
unsigned ComputeHash() const;
|
||||||
|
|
||||||
/// operator== - Used to compare two nodes to each other.
|
/// operator== - Used to compare two nodes to each other.
|
||||||
|
@ -447,8 +447,8 @@ public:
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
/// FoldingSetBucketIteratorImpl - This is the common bucket iterator support
|
/// FoldingSetBucketIteratorImpl - This is the common bucket iterator support
|
||||||
/// shared by all folding sets, which knows how to walk a particular bucket
|
/// shared by all folding sets, which knows how to walk a particular bucket
|
||||||
/// of a folding set hash table.
|
/// of a folding set hash table.
|
||||||
|
|
||||||
class FoldingSetBucketIteratorImpl {
|
class FoldingSetBucketIteratorImpl {
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue