lld-link: For nonexisting inputs, omit follow-on diagnostics
authorNico Weber <nicolasweber@gmx.de>
Thu, 13 Sep 2018 18:13:21 +0000 (18:13 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 13 Sep 2018 18:13:21 +0000 (18:13 +0000)
commitf1828e324090999545101aaf170d3566c40d1cd4
treefe6ca80bc38684171bc6224d722270ffbd2a047b
parent79c054f6b8b0f7989366f56c84ee30f92e3e6b1f
lld-link: For nonexisting inputs, omit follow-on diagnostics

For lld-link missing.obj, lld-link currently prints:

  lld-link: error: could not open foo.obj: No such file or directory
  lld-link: warning: /machine is not specified. x64 is assumed
  lld-link: error: subsystem must be defined

The 2nd and 3rd diagnostics are consequences of the input not existing and are
not interesting. If input files are missing, the best thing we can do is point
that out and then return.

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

llvm-svn: 342158
lld/COFF/Driver.cpp
lld/test/COFF/could-not-open.test [new file with mode: 0644]