This class provides default implementations for FoldingSetTrait implementations.

Synopsis

Declared in <llvm/ADT/FoldingSet.h>

template<typename T>
struct DefaultFoldingSetTrait;

Types

Name

Description

ContextStorage

Empty marker type when no folding‐set context is stored.

Static Member Functions

Name

Description

ComputeHash

Compute a hash value for X, using TempID to compute a temporary ID if necessary. The default implementation profiles X and hashes the result. Implementations can override this to provide more efficient implementations.

Equals

Test whether the profile for X matches ID, using TempID to compute a temporary ID if necessary. The default implementation profiles X and compares the result to ID. Implementations can override this to provide more efficient comparisons.

Profile

Gather the unique data bits of X into ID by calling X's Profile method.

Derived Classes

Name

Description

FoldingSetTrait<SCEV>

FoldingSetTrait

This trait class is used to define behavior of how 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 through template specialization the behavior can be tailored for specific types. Combined with the FoldingSetNodeWrapper class, one can add objects to FoldingSets that were not originally designed to have that behavior.

FoldingSetTrait<SDVTListNode>

Specialize FoldingSetTrait for SDVTListNode to avoid computing temp FoldingSetNodeID and hash value.

FoldingSetTrait<SCEVPredicate>

Created with MrDocs