aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-01-27 09:10:42 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-01-27 09:10:42 +0000
commit989e7c4d0f042e8ed4f1cc4b0c1fa59b8a1e7d59 (patch)
tree6950ee8d8d01259a7101eb9370cbed684b74c31a
parent25296e25fd30806b4a1f2348cbf73f227962be86 (diff)
Add DenseSet::resize for API parity with DenseMap::resize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124370 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/DenseSet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/ADT/DenseSet.h b/include/llvm/ADT/DenseSet.h
index 00bcf64a2f..67321f5398 100644
--- a/include/llvm/ADT/DenseSet.h
+++ b/include/llvm/ADT/DenseSet.h
@@ -33,6 +33,9 @@ public:
bool empty() const { return TheMap.empty(); }
unsigned size() const { return TheMap.size(); }
+ /// Grow the denseset so that it has at least Size buckets. Does not shrink
+ void resize(size_t Size) { TheMap.resize(Size); }
+
void clear() {
TheMap.clear();
}