llvm.org GIT mirror llvm / 16fe054
Doxygen for FoldingSet::reserve and FoldingSet::capacity git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271694 91177308-0d34-0410-b5e6-96231b3b80d8 Ben Craig 4 years ago
1 changed file(s) with 5 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
179179 /// empty - Returns true if there are no nodes in the folding set.
180180 bool empty() const { return NumNodes == 0; }
181181
182 /// reserve - Increase the number of buckets such that adding the
183 /// EltCount-th node won't cause a rebucket operation. reserve is permitted
184 /// to allocate more space than requested by EltCount.
182185 void reserve(unsigned EltCount);
186 /// capacity - Returns the number of nodes permitted in the folding set
187 /// before a rebucket operation is performed.
183188 unsigned capacity() {
184189 // We allow a load factor of up to 2.0,
185190 // so that means our capacity is NumBuckets * 2