[PATCH] D45548: Avoid hash table lookup when sorting local symbols.
Rafael Avila de Espindola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 12 14:13:48 PDT 2018
espindola added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:1570
[&](const SymbolTableEntry &L, const SymbolTableEntry &R) {
- return FileIDs[L.Sym->File] < FileIDs[R.Sym->File];
+ if (!L.Sym->File || !R.Sym->File)
+ return false;
----------------
Given regular symbol A and an internal symbol B (file is null), this comparison will return false for A < B and B < A.
I think this has to be
if (!L.Sym->File || !R.Sym->File)
return L.Sym->File; // or R.Sym->File.
https://reviews.llvm.org/D45548
More information about the llvm-commits
mailing list