This is close to D25766, but uses list of symbols instead of list of sections.
Numbers I got benchmarking clang -help were:
For 1000 runs of ordered and unordered build amount of pagefaults: 636 vs 641 +- 0.01%.
Time was (from real HW) 0.124324230 vs 0.127807916 (+- 0.2%), so it is 2.8% boost.
Used symbols files is https://justpaste.it/zwm4
Ehm, splitting a file by line is something that can be probably useful outside of lld, so I propose this to live in ADT/StringRef (or something like that).