summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocGreedy.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-03-03 19:58:30 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-03-03 19:58:30 +0000
commit9efaf2f2dad82d5455970af0370edace405791b2 (patch)
treecf6d02ff476e90daf6c9b3a78cfbcfbc59570f96 /lib/CodeGen/RegAllocGreedy.cpp
parentc3835ccef9c8d4d63ba2ec5c7c6c4cb18ee46d49 (diff)
downloadllvm-9efaf2f2dad82d5455970af0370edace405791b2.tar.gz
llvm-9efaf2f2dad82d5455970af0370edace405791b2.tar.bz2
llvm-9efaf2f2dad82d5455970af0370edace405791b2.tar.xz
[C++11] Use std::tie to simplify compare operators.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocGreedy.cpp')
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index b8307c63b2..b9cc2fec8d 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -190,9 +190,8 @@ class RAGreedy : public MachineFunctionPass,
void setBrokenHints(unsigned NHints) { BrokenHints = NHints; }
bool operator<(const EvictionCost &O) const {
- if (BrokenHints != O.BrokenHints)
- return BrokenHints < O.BrokenHints;
- return MaxWeight < O.MaxWeight;
+ return std::tie(BrokenHints, MaxWeight) <
+ std::tie(O.BrokenHints, O.MaxWeight);
}
};