llvm-project/clang/lib/Driver
Serge Pavlov b43573b9a4 Driver must return non-zero code on errors in command line
This is recommit of r302775, reverted in r302777 due to a fail in
clang-tidy. Original mesage is below.

Now if clang driver is given wrong arguments, in some cases it
continues execution and returns zero code. This change fixes this
behavior.

The fix revealed some errors in clang test set.

File test/Driver/gfortran.f90 added in r118203 checks forwarding
gfortran flags to GCC. Now driver reports error on this file, because
the option -working-directory implemented in clang differs from the
option with the same name implemented in gfortran, in clang the option
requires argument, in gfortran does not.

In the file test/Driver/arm-darwin-builtin.c clang is called with
options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed
in r191435 and now clang reports error on this test.

File arm-default-build-attributes.s uses option -verify, which is not
supported by driver, it is cc1 option.

Similarly, the file split-debug.h uses options -fmodules-embed-all-files
and -fmodule-format=obj, which are not supported by driver.

Other revealed errors are mainly mistypes.

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

llvm-svn: 303756
2017-05-24 14:57:17 +00:00
..
ToolChains Added LLVM_FALLTHROUGH to address gcc warning: this statement may fall through. 2017-05-23 05:17:49 +00:00
Action.cpp Fix MSVC "not all control paths return a value" warning 2016-10-28 10:09:35 +00:00
CMakeLists.txt [XRay] Add -fxray-{always,never}-instrument= flags to clang 2017-03-30 00:29:36 +00:00
Compilation.cpp [Driver][OpenMP] Add logic for offloading-specific argument translation. 2016-10-27 17:39:44 +00:00
Distro.cpp Add support of the next Ubuntu (Ubuntu 17.10 - Artful Aardvark) 2017-05-04 12:46:38 +00:00
Driver.cpp Driver must return non-zero code on errors in command line 2017-05-24 14:57:17 +00:00
DriverOptions.cpp unique_ptrify createDriverOptTable 2017-01-13 17:34:15 +00:00
InputInfo.h Add an Action* member to InputInfo. 2016-01-11 23:15:21 +00:00
Job.cpp The -coverage-file flag was removed in r280306, and this piece was missed; NFC. 2017-05-01 13:05:04 +00:00
Multilib.cpp Multilib: add dump methods 2017-05-05 21:30:13 +00:00
Phases.cpp Reapply "Change -save-temps to emit unoptimized bitcode files." 2014-12-21 07:00:00 +00:00
SanitizerArgs.cpp [asan] A clang flag to enable ELF globals-gc. 2017-05-09 21:57:43 +00:00
Tool.cpp Rename the version of ConstructJob for multiple outputs to ConstructJobMultipleOutputs. 2016-11-03 15:41:50 +00:00
ToolChain.cpp [XRay] Add -fxray-{always,never}-instrument= flags to clang 2017-03-30 00:29:36 +00:00
Types.cpp [Driver][OpenMP] Update actions builder to create unbundling action when necessary. 2016-10-27 18:00:51 +00:00
XRayArgs.cpp [XRay][clang] Fix the -fxray-instruction-threshold flag processing 2017-03-30 22:46:45 +00:00