File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -289,8 +289,8 @@ struct LineLocation {
289
289
LLVM_ABI void serialize (raw_ostream &OS);
290
290
291
291
bool operator <(const LineLocation &O) const {
292
- return LineOffset < O. LineOffset ||
293
- (LineOffset == O.LineOffset && Discriminator < O.Discriminator );
292
+ return std::tie ( LineOffset, Discriminator) <
293
+ std::tie ( O.LineOffset , O.Discriminator );
294
294
}
295
295
296
296
bool operator ==(const LineLocation &O) const {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ struct HexagonBlockRanges {
37
37
unsigned Sub;
38
38
39
39
bool operator <(RegisterRef R) const {
40
- return Reg < R. Reg || (Reg == R.Reg && Sub < R.Sub );
40
+ return std::tie ( Reg, Sub) < std::tie ( R.Reg , R.Sub );
41
41
}
42
42
};
43
43
using RegisterSet = std::set<RegisterRef>;
Original file line number Diff line number Diff line change @@ -80,12 +80,12 @@ struct MIRef {
80
80
bool operator <(const MIRef &RHS) const {
81
81
// Comparison between different BBs happens when inserting a MIRef into set.
82
82
// So we compare MBB first to make the insertion happy.
83
- return MBB < RHS. MBB || (MBB == RHS.MBB && Pos < RHS.Pos );
83
+ return std::tie ( MBB, Pos) < std::tie ( RHS.MBB , RHS.Pos );
84
84
}
85
85
bool operator >(const MIRef &RHS) const {
86
86
// Comparison between different BBs happens when inserting a MIRef into set.
87
87
// So we compare MBB first to make the insertion happy.
88
- return MBB > RHS. MBB || (MBB == RHS.MBB && Pos > RHS.Pos );
88
+ return std::tie ( MBB, Pos) > std::tie ( RHS.MBB , RHS.Pos );
89
89
}
90
90
};
91
91
You can’t perform that action at this time.
0 commit comments