summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/VTableBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/VTableBuilder.cpp')
-rw-r--r--clang/lib/AST/VTableBuilder.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp
index 741be14da6d..ce27fba524c 100644
--- a/clang/lib/AST/VTableBuilder.cpp
+++ b/clang/lib/AST/VTableBuilder.cpp
@@ -2156,10 +2156,7 @@ void ItaniumVTableBuilder::dumpLayout(raw_ostream &Out) {
std::sort(ThunksVector.begin(), ThunksVector.end(),
[](const ThunkInfo &LHS, const ThunkInfo &RHS) {
assert(LHS.Method == 0 && RHS.Method == 0);
-
- if (LHS.This != RHS.This)
- return LHS.This < RHS.This;
- return LHS.Return < RHS.Return;
+ return std::tie(LHS.This, LHS.Return) < std::tie(RHS.This, RHS.Return);
});
Out << "Thunks for '" << MethodName << "' (" << ThunksVector.size();
@@ -3169,9 +3166,7 @@ void VFTableBuilder::dumpLayout(raw_ostream &Out) {
[](const ThunkInfo &LHS, const ThunkInfo &RHS) {
// Keep different thunks with the same adjustments in the order they
// were put into the vector.
- if (LHS.This != RHS.This)
- return LHS.This < RHS.This;
- return LHS.Return < RHS.Return;
+ return std::tie(LHS.This, LHS.Return) < std::tie(RHS.This, RHS.Return);
});
Out << "Thunks for '" << MethodName << "' (" << ThunksVector.size();
OpenPOWER on IntegriCloud