Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions llvm/include/llvm/ADT/DenseMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,11 @@ class DenseMap : public DenseMapBase<DenseMap<KeyT, ValueT, KeyInfoT, BucketT>,
unsigned NumBuckets;

public:
/// Create a DenseMap with an optional \p InitialReserve that guarantee that
/// this number of elements can be inserted in the map without grow()
explicit DenseMap(unsigned InitialReserve = 0) { init(InitialReserve); }
/// Create a DenseMap with an optional \p NumElementsToReserve to guarantee
/// that this number of elements can be inserted in the map without grow().
explicit DenseMap(unsigned NumElementsToReserve = 0) {
init(NumElementsToReserve);
}

DenseMap(const DenseMap &other) : BaseT() {
init(0);
Expand Down Expand Up @@ -887,8 +889,8 @@ class SmallDenseMap
AlignedCharArrayUnion<BucketT[InlineBuckets], LargeRep> storage;

public:
explicit SmallDenseMap(unsigned NumElementsToReservre = 0) {
init(NumElementsToReservre);
explicit SmallDenseMap(unsigned NumElementsToReserve = 0) {
init(NumElementsToReserve);
}

SmallDenseMap(const SmallDenseMap &other) : BaseT() {
Expand Down
Loading