Skip to content

Commit c2e220b

Browse files
kazutakahiratarorth
authored andcommitted
[IPO] Use std::tie to implement operator< (NFC) (llvm#143561)
std::tie facilitates lexicographical comparisons through std::tuple's built-in operator<.
1 parent a287150 commit c2e220b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ struct TypeMemberInfo {
113113
uint64_t Offset;
114114

115115
bool operator<(const TypeMemberInfo &other) const {
116-
return Bits < other.Bits || (Bits == other.Bits && Offset < other.Offset);
116+
return std::tie(Bits, Offset) < std::tie(other.Bits, other.Offset);
117117
}
118118
};
119119

0 commit comments

Comments
 (0)