diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-03 19:58:30 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-03 19:58:30 +0000 |
commit | 9efaf2f2dad82d5455970af0370edace405791b2 (patch) | |
tree | cf6d02ff476e90daf6c9b3a78cfbcfbc59570f96 /lib/CodeGen/RegAllocGreedy.cpp | |
parent | c3835ccef9c8d4d63ba2ec5c7c6c4cb18ee46d49 (diff) | |
download | llvm-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.cpp | 5 |
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); } }; |