[llvm-commits] [llvm] r124370 - /llvm/trunk/include/llvm/ADT/DenseSet.h

Nick Lewycky nicholas at mxc.ca
Thu Jan 27 01:10:43 PST 2011


Author: nicholas
Date: Thu Jan 27 03:10:42 2011
New Revision: 124370

URL: http://llvm.org/viewvc/llvm-project?rev=124370&view=rev
Log:
Add DenseSet::resize for API parity with DenseMap::resize.

Modified:
    llvm/trunk/include/llvm/ADT/DenseSet.h

Modified: llvm/trunk/include/llvm/ADT/DenseSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseSet.h?rev=124370&r1=124369&r2=124370&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseSet.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseSet.h Thu Jan 27 03:10:42 2011
@@ -33,6 +33,9 @@
   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();
   }





More information about the llvm-commits mailing list