================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to