summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/debug-options.c
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2017-05-24 14:57:17 +0000
committerSerge Pavlov <sepavloff@gmail.com>2017-05-24 14:57:17 +0000
commitb43573b9a4ab69c03d435054ffec4dc495b73035 (patch)
tree87b8ccb2ea912b0effdd6454ef677aae36a8aa1e /clang/test/Driver/debug-options.c
parent6232406b34335a613011fcd828b67d2e9ac4b0a2 (diff)
downloadbcm5719-llvm-b43573b9a4ab69c03d435054ffec4dc495b73035.tar.gz
bcm5719-llvm-b43573b9a4ab69c03d435054ffec4dc495b73035.zip
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
Diffstat (limited to 'clang/test/Driver/debug-options.c')
-rw-r--r--clang/test/Driver/debug-options.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c
index 74deb414fc5..b4a2e909b3a 100644
--- a/clang/test/Driver/debug-options.c
+++ b/clang/test/Driver/debug-options.c
@@ -80,7 +80,7 @@
// RUN: %clang -### -c -gdwarf-2 %s 2>&1 \
// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
//
-// RUN: %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=G_NO %s
+// RUN: not %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=G_ERR %s
// RUN: %clang -### -c -g -g0 %s 2>&1 | FileCheck -check-prefix=G_NO %s
// RUN: %clang -### -c -ggdb0 %s 2>&1 | FileCheck -check-prefix=G_NO %s
// RUN: %clang -### -c -glldb -g0 %s 2>&1 | FileCheck -check-prefix=G_NO %s
@@ -171,6 +171,8 @@
// G_PS4: "-dwarf-version=
// G_PS4: "-generate-arange-section"
//
+// G_ERR: error: unknown argument:
+//
// G_NO: "-cc1"
// G_NO-NOT: -debug-info-kind=
//
OpenPOWER on IntegriCloud