Ports:
- core feature: https://reviews.llvm.org/D67039
- case mismatch: https://reviews.llvm.org/D70506
- extern "C" suggestions: https://reviews.llvm.org/D69592, https://reviews.llvm.org/D69650
Does not port https://reviews.llvm.org/D71735 since I believe that that doesn't
apply to lld/Mach-O.
I was a bit skeptical of the feature when it was initially added, but I think it's
proved itself in the ELF port.
This function does some intensive works - is it worth caching the results?
(OTOTH, maybe performance isn't important in case of failures, anyways 🤔 )