[llvm] [Object] Provide operator< for ELFSymbolRef (PR #89861)
Amir Ayupov via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 08:34:11 PDT 2024
aaupov wrote:
> 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."
Thanks, updated.
>
> 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.
No, it doesn't: https://github.com/llvm/llvm-project/blob/2d09ac4037415ab0044ad508aae2ff8b2559a9d8/llvm/include/llvm/Object/SymbolicFile.h#L53-L67
https://github.com/llvm/llvm-project/pull/89861
More information about the llvm-commits
mailing list