[PATCH] D135038: [lld/mac] Port typo correction for undefined symbols from ELF port

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 16:02:10 PDT 2022


thakis added a comment.

In D135038#3832164 <https://reviews.llvm.org/D135038#3832164>, @int3 wrote:

> I was wondering if we could have more code sharing with the ELF port, or if it's too messy to be worth the effort of refactoring

Some things could be shared if we wanted, but there's also a bunch of differences (some silly, like it being `sym.file` in ELF vs `sym.getFile()` in MachO and `file->getSymbols()` in ELF vs `file->symbols` in MachO, or there not being an isUndefined() in MachO; some more structural, such as MachO having to deal with the extra `_` prefix). The code that generates all the candidates is pretty similar, but if we share it we make it harder to change the symtab impl of each port. I thought duplicating it is nicer, but *shrug*. Happy to change concrete things if you have something concrete that you feel would be better.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135038/new/

https://reviews.llvm.org/D135038



More information about the llvm-commits mailing list