Made 'profiling' of objects in a FoldingSet trait-based using FoldingSetTrait
authorTed Kremenek <kremenek@apple.com>
Sat, 19 Jan 2008 03:58:00 +0000 (03:58 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 19 Jan 2008 03:58:00 +0000 (03:58 +0000)
commita753f703d1e532dbec5f89c6af834ccd72581ca9
treeb346330f811dbdacdf38fbf40031c00ed41d1e44
parentb4eae999f6064291ef1069a5d5e219189cc902a4
Made 'profiling' of objects in a FoldingSet trait-based using FoldingSetTrait
instead of always assuming that the stored objects had a method called
'Profile'. The default behavior is to dispatch to a 'Profile' method (as
before), but via template specialization this behavior can now be overridden by
clients.

Added templated class 'FoldingSetNodeWrapper', a generic wrapper class that
allows one to insert objects into a FoldingSet that do not directly inherit from
FoldingSetNode. This is useful for inserting objects that do not always need to
pay the overhead of inheriting from FoldingSetNode, or were designed with that
behavior in mind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46186 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/FoldingSet.h