aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/LiveInterval.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-rw-r--r--include/llvm/CodeGen/LiveInterval.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index 3a9fef6..41d126a 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -173,7 +173,7 @@ namespace llvm {
}
bool operator<(const Segment &Other) const {
- return start < Other.start || (start == Other.start && end < Other.end);
+ return std::tie(start, end) < std::tie(Other.start, Other.end);
}
bool operator==(const Segment &Other) const {
return start == Other.start && end == Other.end;
@@ -552,8 +552,7 @@ namespace llvm {
bool operator<(const LiveInterval& other) const {
const SlotIndex &thisIndex = beginIndex();
const SlotIndex &otherIndex = other.beginIndex();
- return thisIndex < otherIndex ||
- (thisIndex == otherIndex && reg < other.reg);
+ return std::tie(thisIndex, reg) < std::tie(otherIndex, other.reg);
}
void print(raw_ostream &OS) const;