Files
clang-p2996/llvm/unittests/Object/ELFObjectFileTest.cpp
Amir Ayupov df6d2faa22 [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.
2024-04-29 09:07:26 -07:00

55 KiB