Similar to D62188: a BitcodeFile's symbol table may be iterated twice, once in
--start-lib (lazy) state, and once in the non-lazy state. This patch
make parseLazy save symbols[i] so that the non-lazy state does not need to
re-insert to the global symbol table. Avoiding a redundant saver.save likely
results in some memory saving.
Maximum resident set size (kbytes) for a large --thinlto-index-only link:
- without the patch: 10164000
- with the patch: 10095716 (0.6% decrease)
Note: we can remove saver.save if BitcodeCompiler::add does not transfer the ownership
of f.obj in checkError(ltoObj->add(std::move(f.obj), resols));.