diff options
Diffstat (limited to 'include/llvm/ADT/DenseSet.h')
-rw-r--r-- | include/llvm/ADT/DenseSet.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/DenseSet.h b/include/llvm/ADT/DenseSet.h index 9388338..00bcf64 100644 --- a/include/llvm/ADT/DenseSet.h +++ b/include/llvm/ADT/DenseSet.h @@ -58,6 +58,7 @@ public: class Iterator { typename MapTy::iterator I; + friend class DenseSet; public: typedef typename MapTy::iterator::difference_type difference_type; typedef ValueT value_type; @@ -77,6 +78,7 @@ public: class ConstIterator { typename MapTy::const_iterator I; + friend class DenseSet; public: typedef typename MapTy::const_iterator::difference_type difference_type; typedef ValueT value_type; @@ -103,6 +105,10 @@ public: const_iterator begin() const { return ConstIterator(TheMap.begin()); } const_iterator end() const { return ConstIterator(TheMap.end()); } + iterator find(const ValueT &V) { return Iterator(TheMap.find(V)); } + void erase(Iterator I) { return TheMap.erase(I.I); } + void erase(ConstIterator CI) { return TheMap.erase(CI.I); } + std::pair<iterator, bool> insert(const ValueT &V) { return TheMap.insert(std::make_pair(V, 0)); } |