Add a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.
[oota-llvm.git] / include / llvm / ADT / DenseSet.h
index 00bcf64a2fc7c246514b33753f05a308fb363419..8ab9a33200c3b5025e52897f7280fe3d33b9e766 100644 (file)
@@ -28,11 +28,14 @@ class DenseSet {
   MapTy TheMap;
 public:
   DenseSet(const DenseSet &Other) : TheMap(Other.TheMap) {}
-  explicit DenseSet(unsigned NumInitBuckets = 64) : TheMap(NumInitBuckets) {}
+  explicit DenseSet(unsigned NumInitBuckets = 0) : TheMap(NumInitBuckets) {}
 
   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();
   }