This is an archive of the discontinued LLVM Phabricator instance.

lld: Reduce number of references to undefined printed from 10 to 3.
ClosedPublic

Authored by thakis on Mar 29 2020, 10:07 AM.

Details

Summary

As of a while ago, lld groups all undefined references to a single
symbol in a single diagnostic. Back then, I made it so that we
print up to 10 references to each undefined symbol.

Having used this for a while, I never wished there were more
references, but I sometimes found that this can print a lot of
output. lld prints up to 10 diagnostics by default, and if
each has 10 references (which I've seen in practice), and each
undefined symbol produces 2 (possibly very long) lines of output,
that's over 200 lines of error output.

Let's try it with just 3 references for a while and see how
that feels in practice.

Diff Detail

Event Timeline

thakis created this revision.Mar 29 2020, 10:07 AM

(If someone wants to see _all_ undefined refs, we could make it so that -ferror-limit=0 disables this limiting, but I haven't heard anyone wishing for that so far, so I wouldn't do that for now.)

(If someone wants to see _all_ undefined refs, we could make it so that -ferror-limit=0 disables this limiting, but I haven't heard anyone wishing for that so far, so I wouldn't do that for now.)

I assume you mean --error-limit=0. Yeah, I don't know who has a need for that so far.

MaskRay accepted this revision.Mar 29 2020, 10:35 AM

LGTM.

This revision is now accepted and ready to land.Mar 29 2020, 10:35 AM