Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions llvm/include/llvm/ADT/DenseMapInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,11 @@ struct DenseMapInfo<std::pair<T, U>> {
using SecondInfo = DenseMapInfo<U>;

static constexpr Pair getEmptyKey() {
return std::make_pair(FirstInfo::getEmptyKey(),
SecondInfo::getEmptyKey());
return {FirstInfo::getEmptyKey(), SecondInfo::getEmptyKey()};
}

static constexpr Pair getTombstoneKey() {
return std::make_pair(FirstInfo::getTombstoneKey(),
SecondInfo::getTombstoneKey());
return {FirstInfo::getTombstoneKey(), SecondInfo::getTombstoneKey()};
}

static unsigned getHashValue(const Pair& PairVal) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ADT/STLExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ class indexed_accessor_range
offset_base(const std::pair<BaseT, ptrdiff_t> &base, ptrdiff_t index) {
// We encode the internal base as a pair of the derived base and a start
// index into the derived base.
return std::make_pair(base.first, base.second + index);
return {base.first, base.second + index};
}
/// See `detail::indexed_accessor_range_base` for details.
static ReferenceT
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ADT/SparseMultiSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class SparseMultiSet {
RangePair equal_range(const KeyT &K) {
iterator B = find(K);
iterator E = iterator(this, SMSNode::INVALID, B.SparseIdx);
return std::make_pair(B, E);
return {B, E};
}

/// Insert a new element at the tail of the subset list. Returns an iterator
Expand Down
8 changes: 4 additions & 4 deletions llvm/include/llvm/ADT/StringRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,8 @@ namespace llvm {
split(StringRef Separator) const {
size_t Idx = find(Separator);
if (Idx == npos)
return std::make_pair(*this, StringRef());
return std::make_pair(slice(0, Idx), substr(Idx + Separator.size()));
return {*this, StringRef()};
return {slice(0, Idx), substr(Idx + Separator.size())};
}

/// Split into two substrings around the last occurrence of a separator
Expand All @@ -735,8 +735,8 @@ namespace llvm {
rsplit(StringRef Separator) const {
size_t Idx = rfind(Separator);
if (Idx == npos)
return std::make_pair(*this, StringRef());
return std::make_pair(slice(0, Idx), substr(Idx + Separator.size()));
return {*this, StringRef()};
return {slice(0, Idx), substr(Idx + Separator.size())};
}

/// Split into substrings around the occurrences of a separator string.
Expand Down