[PATCH] D63344: lld/elf: Deduplicate undefined symbol diagnostics
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 05:30:56 PDT 2019
thakis marked an inline comment as done.
thakis added inline comments.
================
Comment at: lld/Common/ErrorHandler.cpp:137
- ++ErrorCount;
+ ErrorCount += NDiags;
}
----------------
ruiu wrote:
> To me, reporting a single undefined symbol that is used by multiple object files is still counted as a single error. That kind of error is actually likely to be caused by a single error to forget defining a symbol or something.
>
> I don't feel strongly about that, though. But in that case, I'd choose a simpler one. Handle all error() calls as a single erorr is simpler.
I was unsure about this too. I think the motivation for `-error-limit` is probably to prevent unbounded error output by default, and if a single undef symbol can now produce an unboundedly long list of references, we lose that property. But the implementation was not very elegant. Another idea would be to only omit the first (say) 3 references and then say ">> and 532 more references". If we wanted we could then add a "-undef-limit" flag for people who want to see more than 3. WDYT?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63344/new/
https://reviews.llvm.org/D63344
More information about the llvm-commits
mailing list