diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
commit | d39c594d39df7f283c2fb8a704a3f31c501180d9 (patch) | |
tree | 36453626c792cccd91f783a38a169d610a6b9db9 /include/llvm/ADT/DenseSet.h | |
parent | 6144c1de6a7674dad94290650e4e14f24d42e421 (diff) |
Notes
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 938833866fcdb..00bcf64a2fc7c 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)); } |