Skip to content

Commit 458ac49

Browse files
[ADT] Adjust a comment for one of the DenseMap constructors (NFC)
We now have: explicit SmallDenseMap(unsigned NumElementsToReservre = 0) { init(NumElementsToReservre); } This patch adjusts the variable name in the DenseMap counterpart for consistency and clarity.
1 parent 5719fb8 commit 458ac49

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/include/llvm/ADT/DenseMap.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,11 @@ class DenseMap : public DenseMapBase<DenseMap<KeyT, ValueT, KeyInfoT, BucketT>,
710710
unsigned NumBuckets;
711711

712712
public:
713-
/// Create a DenseMap with an optional \p InitialReserve that guarantee that
714-
/// this number of elements can be inserted in the map without grow()
715-
explicit DenseMap(unsigned InitialReserve = 0) { init(InitialReserve); }
713+
/// Create a DenseMap with an optional \p NumElementsToReservre to guarantee
714+
/// that this number of elements can be inserted in the map without grow().
715+
explicit DenseMap(unsigned NumElementsToReservre = 0) {
716+
init(NumElementsToReservre);
717+
}
716718

717719
DenseMap(const DenseMap &other) : BaseT() {
718720
init(0);

0 commit comments

Comments
 (0)