Add DenseSet::resize for API parity with DenseMap::resize.
authorNick Lewycky <nicholas@mxc.ca>
Thu, 27 Jan 2011 09:10:42 +0000 (09:10 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Thu, 27 Jan 2011 09:10:42 +0000 (09:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124370 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/DenseSet.h

index 00bcf64a2fc7c246514b33753f05a308fb363419..67321f539848ce97a0118919770dae1a61ba8326 100644 (file)
@@ -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();
   }