From 0e97d8ed67c9d413c987b318f18764e37a6cd89f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 9 Jun 2025 00:38:37 -0700 Subject: [PATCH] [IPO] Use std::tie to implement operator< (NFC) std::tie facilitates lexicographical comparisons through std::tuple's built-in operator<. --- llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h b/llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h index d34473f03c8de..7a03405b4f462 100644 --- a/llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h +++ b/llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h @@ -113,7 +113,7 @@ struct TypeMemberInfo { uint64_t Offset; bool operator<(const TypeMemberInfo &other) const { - return Bits < other.Bits || (Bits == other.Bits && Offset < other.Offset); + return std::tie(Bits, Offset) < std::tie(other.Bits, other.Offset); } };