From b2f034b85e001fd79617f2124560509583118c13 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 3 Mar 2014 19:58:30 +0000 Subject: [C++11] Use std::tie to simplify compare operators. No functionality change. llvm-svn: 202751 --- llvm/lib/CodeGen/RegAllocGreedy.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index b8307c63b2f..b9cc2fec8dc 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/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); } }; -- cgit v1.2.3