Reland "[lld/mac] Port typo correction for undefined symbols from ELF port"
The only difference in the reland is that the loop at the top of
getAlternativeSpelling() now calls dyn_cast_or_null() instead
of dyn_cast() -- a file's symbols list can contain null entries.
The test for this might be slightly involved, so I'll land it in
a follow-up, to make the reland similar to the original commit.
Originally reviewed at:
Differential Revision: https://reviews.llvm.org/D135038
This reverts commit
317b5582b813c51d1fb6723fd44b227b7f274bc7.