Use std::less instead of operator < in less_first and less_second
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 25 Aug 2021 20:11:19 +0000 (13:11 -0700)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 27 Aug 2021 19:56:08 +0000 (12:56 -0700)
commit8f859cc34966ede0054842cb5243536f9572b708
treeb9f9ff09d04675fefa69c7917e8f47706ef15613
parentdbf0d8118ccbfd09def0974bf671c39e94d0be93
Use std::less instead of operator < in less_first and less_second

According to the standard, if p1 and p2 are both pointers, p1 < p2 and
p2 < p1 can both be false in theory in some cases:

https://eel.is/c++draft/expr.rel#4.3

std::less<void> yields a implementation-defined strict total order over
pointers:

https://eel.is/c++draft/comparisons.general

Differential Revision: https://reviews.llvm.org/D108733
llvm/include/llvm/ADT/STLExtras.h