mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 18:36:05 +00:00

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
21 lines
1.0 KiB
ArmAsm
21 lines
1.0 KiB
ArmAsm
// Enabled by default for assembly
|
|
// RUN: %clang -target armv7--none-eabi -### %s 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix CHECK-ENABLED
|
|
|
|
// Can be forced on or off for assembly.
|
|
// RUN: %clang -target armv7--none-eabi -### %s 2>&1 -mno-default-build-attributes \
|
|
// RUN: | FileCheck %s -check-prefix CHECK-DISABLED
|
|
// RUN: %clang -target armv7--none-eabi -### %s 2>&1 -mdefault-build-attributes \
|
|
// RUN: | FileCheck %s -check-prefix CHECK-ENABLED
|
|
|
|
// Option ignored C/C++ (since we always emit hardware and ABI build attributes
|
|
// during codegen).
|
|
// RUN: %clang -target armv7--none-eabi -### -x c %s -mdefault-build-attributes 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix CHECK-DISABLED
|
|
// RUN: %clang -target armv7--none-eabi -### -x c++ %s -mdefault-build-attributes 2>&1 \
|
|
// RUN: | FileCheck %s -check-prefix CHECK-DISABLED
|
|
|
|
// CHECK-DISABLED-NOT: "-arm-add-build-attributes"
|
|
// CHECK-ENABLED: "-arm-add-build-attributes"
|
|
// expected-warning {{argument unused during compilation: '-mno-default-build-attributes'}}
|