[llvm] [Object] Provide operator< for ELFSymbolRef (PR #89861)
Amir Ayupov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 18:36:14 PDT 2024
aaupov wrote:
> I've not really looked myself, but are there instances where you actually have two ELFSymbolRef objects that are compared (using `<`)? If not, this code is dead, I believe.
I'm going to use it in FILE symbol lookup using upper_bound on ELFSymbolRefs here, instead of using DRI.d.b (symbol index) directly: https://github.com/llvm/llvm-project/pull/89648
> Also, is there a reason you provide `<` but not `==`? I note that `DataRefImpl` has both.
DataRefImpl's `operator==` is good enough for comparison.
https://github.com/llvm/llvm-project/pull/89861
More information about the llvm-commits
mailing list