ld64.lld used to print the "undefined symbol" line for each reference to
an undefined symbol previously:
ld64.lld: error: undefined symbol: _foo >>> referenced by /path/to/bar.o:(symbol _baz+0x0) ld64.lld: error: undefined symbol: _foo >>> referenced by /path/to/bar.o:(symbol _quux+0x1)
Now they are deduplicated:
ld64.lld: error: undefined symbol: _foo >>> referenced by /path/to/bar.o:(symbol _baz+0x0) >>> referenced by /path/to/bar.o:(symbol _quux+0x1)
As with the other lld ports, only the first 3 references are printed.
Please commit this diff with the following author info:
Daniel Bertalan <dani@danielbertalan.dev>
Something like -u isn't really a location. It makes more sense to me to use Loc to mean section+offset, like LLD-ELF is doing.
How about calling this something like namedSources, given that treatUndefinedSymbol already calls the same value source?