From 6ab6ea46ef7c62e90ace90e36800ba453b5e6050 Mon Sep 17 00:00:00 2001 From: Ben Craig Date: Fri, 3 Jun 2016 17:50:14 +0000 Subject: [PATCH] Doxygen for FoldingSet::reserve and FoldingSet::capacity llvm-svn: 271694 --- include/llvm/ADT/FoldingSet.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index d9531eb32f1..f16258af4ae 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -180,7 +180,12 @@ public: /// empty - Returns true if there are no nodes in the folding set. bool empty() const { return NumNodes == 0; } + /// reserve - Increase the number of buckets such that adding the + /// EltCount-th node won't cause a rebucket operation. reserve is permitted + /// to allocate more space than requested by EltCount. void reserve(unsigned EltCount); + /// capacity - Returns the number of nodes permitted in the folding set + /// before a rebucket operation is performed. unsigned capacity() { // We allow a load factor of up to 2.0, // so that means our capacity is NumBuckets * 2