From b358f0254d7b6470b1ed84a97b601ef102b4e88e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 27 Jan 2007 08:20:15 +0000 Subject: [PATCH] Make SmallSet faster by transparently implementing it with SmallPtrSet. Some clients will need to use SmallPtrSet directly though if they need to iterate over the set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33584 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/SmallSet.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/llvm/ADT/SmallSet.h b/include/llvm/ADT/SmallSet.h index d78813c6151..64eb5814ab9 100644 --- a/include/llvm/ADT/SmallSet.h +++ b/include/llvm/ADT/SmallSet.h @@ -15,6 +15,7 @@ #define LLVM_ADT_SMALLSET_H #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/SmallPtrSet.h" #include namespace llvm { @@ -101,6 +102,10 @@ private: } }; +/// If this set is of pointer values, transparently switch over to using +/// SmallPtrSet for performance. +template +class SmallSet : public SmallPtrSet {}; } // end namespace llvm