[lld] r251502 - [ELF2] Move sorting and data to the GNU hash table section.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 29 14:25:00 PDT 2015
> template <class ELFT> void GnuHashTableSection<ELFT>::finalize() {
> - const unsigned NumHashed = Out<ELFT>::DynSymTab->getNumGnuHashSymbols();
> + ArrayRef<SymbolBody *> A = Out<ELFT>::DynSymTab->getSymbols();
> + unsigned NumHashed = std::count_if(A.begin(), A.end(), includeInGnuHashTable);
> NBuckets = calcNBuckets(NumHashed);
> MaskWords = calcMaskWords(NumHashed);
Could we write this as:
unsigned NumHashed = HashedSymbols.size();
Cheers,
Rafael
More information about the llvm-commits
mailing list