On Feb 8, 2008, at 6:07 PM, Ted Kremenek wrote:

> I'm wondering if we need to keep on adding specialized "Add" methods
> to FoldingSet.
>
> For example, APInt already has a "Profile" method for adding its
> profile to a FoldingSetNodeID, and APFloat could easily have a Profile
> method added to it.  Now that FoldingSet uses FoldingSetTrait<> to
> profile its contained elements, perhaps we can just include a single
> "Add" member template to FoldingSetNodeID that uses the
> FoldingSetTrait<> to profile a generic item.  When people want to
> include profiling support for a datatype, they need only specialize
> FoldingSetTrait<> (if the datatype doesn't already have a Profile
> method).  This avoids bloat in the API for FoldingSetNodeID.  If
> anyone else thinks this is a good idea, I'll go ahead and make the
> change.

That sounds great to me.  I'd rather have various classes know about  
foldingset than having foldingset know about all classes,

-Chris
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to