llvm-project
df6d2faa - [Object] Provide operator< for ELFSymbolRef (#89861)

Commit
1 year ago
[Object] Provide operator< for ELFSymbolRef (#89861) Normally, operator< accepting DataRefImpl is used when comparing SymbolRef/ELFSymbolRef. However, it uses std::memcmp which interprets DataRefImpl union as char string so that the result depends on host endianness. 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.
Author
Parents
Loading