Changes in directory llvm/include/llvm/ADT:
SmallSet.h updated: 1.5 -> 1.6 --- Log message: Make SmallSet<whatever*, N> faster by transparently implementing it with SmallPtrSet. Some clients will need to use SmallPtrSet directly though if they need to iterate over the set. --- Diffs of the changes: (+5 -0) SmallSet.h | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/include/llvm/ADT/SmallSet.h diff -u llvm/include/llvm/ADT/SmallSet.h:1.5 llvm/include/llvm/ADT/SmallSet.h:1.6 --- llvm/include/llvm/ADT/SmallSet.h:1.5 Sat Jan 27 02:14:53 2007 +++ llvm/include/llvm/ADT/SmallSet.h Sat Jan 27 02:20:15 2007 @@ -15,6 +15,7 @@ #define LLVM_ADT_SMALLSET_H #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/SmallPtrSet.h" #include <set> namespace llvm { @@ -101,6 +102,10 @@ } }; +/// If this set is of pointer values, transparently switch over to using +/// SmallPtrSet for performance. +template <typename PointeeType, unsigned N> +class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {}; } // end namespace llvm _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits