[PATCH] D63646: Port r363962 to COFF: Deduplicate undefined symbol diagnostics

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 21 05:35:01 PDT 2019


thakis created this revision.
thakis added a reviewer: ruiu.
Herald added a project: LLVM.

lld/coff already deduplicated undefined symbols on a TU level: It would
group all references to a symbol from a single TU. This makes it so that
references from all TUs to a single symbol are grouped together.

Since lld/coff almost did what I thought it did already, the patch is
much smaller than the elf version. The only not local change is that
getSymbolLocations() now returns a vector<string> instead of a string,
so that the undefined symbol reporting code can know how many references
to a symbol exist in a given TU.

Fixes PR42260 for lld/coff.


https://reviews.llvm.org/D63646

Files:
  lld/COFF/Chunks.cpp
  lld/COFF/SymbolTable.cpp
  lld/COFF/SymbolTable.h
  lld/test/COFF/undefined-symbol-multi.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63646.205977.patch
Type: text/x-patch
Size: 6945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190621/5602c320/attachment.bin>


More information about the llvm-commits mailing list