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
26 changes: 8 additions & 18 deletions llvm/include/llvm/ADT/DenseMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -751,18 +751,12 @@ class DenseMap : public DenseMapBase<DenseMap<KeyT, ValueT, KeyInfoT, BucketT>,
init(NumElementsToReserve);
}

DenseMap(const DenseMap &other) : BaseT() {
init(0);
this->copyFrom(other);
}
DenseMap(const DenseMap &other) : DenseMap() { this->copyFrom(other); }

DenseMap(DenseMap &&other) : BaseT() {
init(0);
this->swap(other);
}
DenseMap(DenseMap &&other) : DenseMap() { this->swap(other); }

template <typename InputIt> DenseMap(const InputIt &I, const InputIt &E) {
init(std::distance(I, E));
template <typename InputIt>
DenseMap(const InputIt &I, const InputIt &E) : DenseMap(std::distance(I, E)) {
this->insert(I, E);
}

Expand Down Expand Up @@ -901,19 +895,15 @@ class SmallDenseMap
init(NumElementsToReserve);
}

SmallDenseMap(const SmallDenseMap &other) : BaseT() {
init(0);
SmallDenseMap(const SmallDenseMap &other) : SmallDenseMap() {
this->copyFrom(other);
}

SmallDenseMap(SmallDenseMap &&other) : BaseT() {
init(0);
this->swap(other);
}
SmallDenseMap(SmallDenseMap &&other) : SmallDenseMap() { this->swap(other); }

template <typename InputIt>
SmallDenseMap(const InputIt &I, const InputIt &E) {
init(std::distance(I, E));
SmallDenseMap(const InputIt &I, const InputIt &E)
: SmallDenseMap(std::distance(I, E)) {
this->insert(I, E);
}

Expand Down