[clang] [llvm] [mlir] [ADT] Give DenseMapPair its own members instead of a std::pair base. NFC (PR #221853)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 20:02:36 PDT 2026
================
@@ -606,7 +606,10 @@ GVNSink::analyzeInstructionForSinking(LockstepReverseIterator<false> &LRI,
return std::nullopt;
VNums[N]++;
}
- unsigned VNumToSink = llvm::max_element(VNums, llvm::less_second())->first;
+ unsigned VNumToSink =
+ llvm::max_element(VNums, [](const auto &L, const auto &R) {
+ return L.second < R.second;
+ })->first;
----------------
MaskRay wrote:
std::get can't be overloaded here: `[namespace.std]` allows only specializations of standard templates for program-defined types, and std::get is a function template, so adding overloads in namespace std is undefined behavior.
https://github.com/llvm/llvm-project/pull/221853
More information about the llvm-commits
mailing list