aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-07-27 23:55:47 +0000
committerOwen Anderson <resistor@mac.com>2010-07-27 23:55:47 +0000
commitcf85c9612959e7326ddba9d4fb0a997c155b74c1 (patch)
tree6bcd8fcc467c500ebfe1d84103350f9c417012aa /include/llvm/ADT
parent3c73a6b650e838d20814e51cb693c8902ae2b21f (diff)
downloadexternal_llvm-cf85c9612959e7326ddba9d4fb0a997c155b74c1.zip
external_llvm-cf85c9612959e7326ddba9d4fb0a997c155b74c1.tar.gz
external_llvm-cf85c9612959e7326ddba9d4fb0a997c155b74c1.tar.bz2
Fill out the interface of DenseSet a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/DenseSet.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/DenseSet.h b/include/llvm/ADT/DenseSet.h
index 9388338..765105b 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)); }
+ bool erase(Iterator I) { return TheMap.erase(I.I); }
+ bool erase(ConstIterator CI) { return TheMap.erase(CI.I); }
+
std::pair<iterator, bool> insert(const ValueT &V) {
return TheMap.insert(std::make_pair(V, 0));
}