driver: Don't warn about assembler flags being unused when not assembling; different...
authorNico Weber <nicolasweber@gmx.de>
Sat, 27 Jul 2019 01:13:00 +0000 (01:13 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sat, 27 Jul 2019 01:13:00 +0000 (01:13 +0000)
commitb28ffd8f3578ca198f12ffa8beb8ca883bb2cb20
tree568c25f07e429bd8c6e90a57271182ed019359cf
parent7bc4fad0fbee60530f0b50d8e3911a21d47046bd
driver: Don't warn about assembler flags being unused when not assembling; different approach

This morally relands r365703 (and r365714), originally reviewed at
https://reviews.llvm.org/D64527, but with a different implementation.

Relanding the same approach with a fix for the revert reason got a bit
involved (see https://reviews.llvm.org/D65108) so use a simpler approach
with a more localized implementation (that in return duplicates code
a bit more).

This approach also doesn't validate flags for the integrated assembler
if the assembler step doesn't run.

Fixes PR42066.

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

llvm-svn: 367165
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/as-options.s