[COFF] support /ERRORLIMIT option
authorBob Haarman <llvm@inglorion.net>
Wed, 5 Apr 2017 00:43:54 +0000 (00:43 +0000)
committerBob Haarman <llvm@inglorion.net>
Wed, 5 Apr 2017 00:43:54 +0000 (00:43 +0000)
commitac8f7fc07b72062de631a521191430aec2695f49
tree5dd795f9f548d497ce33fdb92381634da38473d6
parent2c7171bf3ce7bb24d5830ce586ffa07cbabd20c1
[COFF] support /ERRORLIMIT option

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.

Reviewers: pcc, ruiu

Reviewed By: ruiu

Subscribers: llvm-commits, dblaikie

Differential Revision: https://reviews.llvm.org/D31688

llvm-svn: 299496
lld/COFF/Driver.cpp
lld/COFF/Error.cpp
lld/COFF/Options.td
lld/COFF/SymbolTable.cpp
lld/test/COFF/error-limit.test [new file with mode: 0644]