X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FDenseSet.h;h=8ab9a33200c3b5025e52897f7280fe3d33b9e766;hb=acb8d9fbe3853394a2537985349993580309b8cd;hp=00bcf64a2fc7c246514b33753f05a308fb363419;hpb=e3955df639ff9aff990f628ef6a219ff5efdbc81;p=oota-llvm.git diff --git a/include/llvm/ADT/DenseSet.h b/include/llvm/ADT/DenseSet.h index 00bcf64a2fc..8ab9a33200c 100644 --- a/include/llvm/ADT/DenseSet.h +++ b/include/llvm/ADT/DenseSet.h @@ -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(); }