Skip to content

Commit 70c3c52

Browse files
kazutakahiratatomtor
authored andcommitted
[memprof] Use std::tie to implement operator< (NFC) (llvm#143401)
1 parent 37ab8a9 commit 70c3c52

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/include/llvm/ProfileData/MemProf.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,7 @@ struct LineLocation {
835835
LineLocation(uint32_t L, uint32_t D) : LineOffset(L), Column(D) {}
836836

837837
bool operator<(const LineLocation &O) const {
838-
return LineOffset < O.LineOffset ||
839-
(LineOffset == O.LineOffset && Column < O.Column);
838+
return std::tie(LineOffset, Column) < std::tie(O.LineOffset, O.Column);
840839
}
841840

842841
bool operator==(const LineLocation &O) const {

0 commit comments

Comments
 (0)