[llvm] [Object] Provide operator< for ELFSymbolRef (PR #89861)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 00:39:58 PDT 2024
https://github.com/jh7370 commented:
Thanks for the explanation about why this whole thing is important, the new commit message is certainly clearer. I think the last sentence of the description would be clearer saying:
"For ELFSymbolRef a specialized operator< can be used instead to produce consistent ordering regardless of endianness by comparing the symbol table index and symbol index fields separately."
One other thing: does `DataRefImpl` have an `operator>`? If so, you'll need that here too as otherwise two ELFSymbolRefs will not have inconsistent orderings based on which comparison operator is being used.
https://github.com/llvm/llvm-project/pull/89861
More information about the llvm-commits
mailing list