diff options
Diffstat (limited to 'include/llvm/ADT/SmallSet.h')
-rw-r--r-- | include/llvm/ADT/SmallSet.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallSet.h b/include/llvm/ADT/SmallSet.h index bc6493554c8b..39a57b87b2a7 100644 --- a/include/llvm/ADT/SmallSet.h +++ b/include/llvm/ADT/SmallSet.h @@ -37,6 +37,7 @@ class SmallSet { std::set<T, C> Set; typedef typename SmallVector<T, N>::const_iterator VIterator; typedef typename SmallVector<T, N>::iterator mutable_iterator; + public: typedef size_t size_type; SmallSet() {} @@ -92,7 +93,7 @@ public: for (; I != E; ++I) insert(*I); } - + bool erase(const T &V) { if (!isSmall()) return Set.erase(V); @@ -108,6 +109,7 @@ public: Vector.clear(); Set.clear(); } + private: bool isSmall() const { return Set.empty(); } |