diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-01-27 09:10:42 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-01-27 09:10:42 +0000 |
commit | 989e7c4d0f042e8ed4f1cc4b0c1fa59b8a1e7d59 (patch) | |
tree | 6950ee8d8d01259a7101eb9370cbed684b74c31a | |
parent | 25296e25fd30806b4a1f2348cbf73f227962be86 (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.h | 3 |
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(); } |