This is an archive of the discontinued LLVM Phabricator instance.

[COFF] support /ERRORLIMIT option
ClosedPublic

Authored by inglorion on Apr 4 2017, 5:20 PM.

Details

Summary

This adds support for reporting multiple errors in a single invocation of lld-link. The limit defaults to 20 and can be changed with the /ERRORLIMIT command line parameter, or set to unlimited by passing a value of 0.

This is a new attempt after r295507, which was reverted because opening files raced with exiting early, causing the test to be flaky. This version avoids the race by exiting before calling enqueuePath.

Diff Detail

Repository
rL LLVM

Event Timeline

inglorion created this revision.Apr 4 2017, 5:20 PM

Previous diff: D29691. The early exit in Driver.cpp line 820 is now before any paths are enqueued, avoiding the race that existed in the previous diff.

ruiu added inline comments.Apr 4 2017, 5:32 PM
COFF/Driver.cpp
124 ↗(On Diff #94143)

Add a blank line so that this if ~ else is visually separated from the above ifs.

654 ↗(On Diff #94143)

Flip the condition to remove !.

COFF/Error.cpp
75 ↗(On Diff #94143)

Remove?

inglorion updated this revision to Diff 94151.Apr 4 2017, 5:48 PM
inglorion marked 3 inline comments as done.

Fixed issues pointed out by @ruiu (thanks!)

ruiu accepted this revision.Apr 4 2017, 5:52 PM

LGTM

This revision is now accepted and ready to land.Apr 4 2017, 5:52 PM
This revision was automatically updated to reflect the committed changes.