[C++11] Simplify compare operators with std::tie.

No functionality change.

llvm-svn: 202755
This commit is contained in:
Benjamin Kramer
2014-03-03 20:26:46 +00:00
parent b56be64599
commit a741b8c451
8 changed files with 17 additions and 45 deletions

View File

@@ -99,10 +99,8 @@ namespace CodeGen {
}
bool operator<(const OrderGlobalInits &RHS) const {
if (priority < RHS.priority)
return true;
return priority == RHS.priority && lex_order < RHS.lex_order;
return std::tie(priority, lex_order) <
std::tie(RHS.priority, RHS.lex_order);
}
};