diff options
Diffstat (limited to 'clang/test/Driver')
-rw-r--r-- | clang/test/Driver/aarch64-cpus.c | 2 | ||||
-rw-r--r-- | clang/test/Driver/amdgpu-features.c | 4 | ||||
-rw-r--r-- | clang/test/Driver/arm-darwin-builtin.c | 14 | ||||
-rw-r--r-- | clang/test/Driver/arm-default-build-attributes.s | 4 | ||||
-rw-r--r-- | clang/test/Driver/cl-outputs.c | 4 | ||||
-rw-r--r-- | clang/test/Driver/clang_f_opts.c | 2 | ||||
-rw-r--r-- | clang/test/Driver/cuda-external-tools.cu | 4 | ||||
-rw-r--r-- | clang/test/Driver/debug-options.c | 4 | ||||
-rw-r--r-- | clang/test/Driver/gfortran.f90 | 2 | ||||
-rw-r--r-- | clang/test/Driver/split-debug.h | 9 | ||||
-rw-r--r-- | clang/test/Driver/unknown-arg.c | 4 |
11 files changed, 38 insertions, 15 deletions
diff --git a/clang/test/Driver/aarch64-cpus.c b/clang/test/Driver/aarch64-cpus.c index 4c42e50e42d..554c59d6bcd 100644 --- a/clang/test/Driver/aarch64-cpus.c +++ b/clang/test/Driver/aarch64-cpus.c @@ -11,7 +11,7 @@ // RUN: %clang -target arm64 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC %s // RUN: %clang -target arm64 -mcpu=generic -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC %s // RUN: %clang -target arm64 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC %s -// RUN: %clang -target arm64 -mlittle-endian -mcpu=generic -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC %s +// RUN: %clang -target arm64 -mlittle-endian -mcpu-generic -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC %s // ARM64-GENERIC: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "generic" diff --git a/clang/test/Driver/amdgpu-features.c b/clang/test/Driver/amdgpu-features.c index 495cadb1195..235b88f13be 100644 --- a/clang/test/Driver/amdgpu-features.c +++ b/clang/test/Driver/amdgpu-features.c @@ -1,7 +1,7 @@ -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri -mamdgpu-debugger-abi=0.0 %s -o - 2>&1 \ +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri -mamdgpu-debugger-abi=0.0 %s -o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MAMDGPU-DEBUGGER-ABI-0-0 %s // CHECK-MAMDGPU-DEBUGGER-ABI-0-0: the clang compiler does not support '-mamdgpu-debugger-abi=0.0' -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri -mamdgpu-debugger-abi=1.0 %s -o - 2>&1 \ +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri -mamdgpu-debugger-abi=1.0 %s -o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MAMDGPU-DEBUGGER-ABI-1-0 %s // CHECK-MAMDGPU-DEBUGGER-ABI-1-0: "-target-feature" "+amdgpu-debugger-insert-nops" "-target-feature" "+amdgpu-debugger-reserve-regs" "-target-feature" "+amdgpu-debugger-emit-prologue" diff --git a/clang/test/Driver/arm-darwin-builtin.c b/clang/test/Driver/arm-darwin-builtin.c new file mode 100644 index 00000000000..be50b689872 --- /dev/null +++ b/clang/test/Driver/arm-darwin-builtin.c @@ -0,0 +1,14 @@ +// FIXME: Disable pending PR4941. +// RUX: clang -target x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s 2> %t && +// RUX: grep -- "-fno-builtin-strcat" %t && +// RUX: grep -- "-fno-builtin-strcpy" %t && + +// FIXME: Disable pending PR4941. +// RUX: clang -target x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t && +// RUX: not grep -- "-fno-builtin-strcat" %t && +// RUX: not grep -- "-fno-builtin-strcpy" %t && + +// RUN: %clang -target x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t +// RUN: not grep -- "-fno-builtin-strcat" %t +// RUN: not grep -- "-fno-builtin-strcpy" %t + diff --git a/clang/test/Driver/arm-default-build-attributes.s b/clang/test/Driver/arm-default-build-attributes.s index be2bf3c77b0..b651fbb6c9f 100644 --- a/clang/test/Driver/arm-default-build-attributes.s +++ b/clang/test/Driver/arm-default-build-attributes.s @@ -10,9 +10,9 @@ // 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: %clang -target armv7--none-eabi -### -x c %s -mdefault-build-attributes -verify 2>&1 \ // RUN: | FileCheck %s -check-prefix CHECK-DISABLED -// RUN: %clang -target armv7--none-eabi -### -x c++ %s -mdefault-build-attributes 2>&1 \ +// RUN: %clang -target armv7--none-eabi -### -x c++ %s -mdefault-build-attributes -verify 2>&1 \ // RUN: | FileCheck %s -check-prefix CHECK-DISABLED // CHECK-DISABLED-NOT: "-arm-add-build-attributes" diff --git a/clang/test/Driver/cl-outputs.c b/clang/test/Driver/cl-outputs.c index 6e105e46850..d79a577788b 100644 --- a/clang/test/Driver/cl-outputs.c +++ b/clang/test/Driver/cl-outputs.c @@ -73,7 +73,7 @@ // RUN: %clang_cl /c /o .. -### -- %s 2>&1 | FileCheck -check-prefix=oCRAZY2 %s // oCRAZY2: "-o" "..obj" -// RUN: not %clang_cl /c %s -### /o 2>&1 | FileCheck -check-prefix=oMISSINGARG %s +// RUN: %clang_cl /c %s -### /o 2>&1 | FileCheck -check-prefix=oMISSINGARG %s // oMISSINGARG: error: argument to '/o' is missing (expected 1 value) // RUN: %clang_cl /c /omydir/ -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-oMULTIPLESOURCEOK1 %s @@ -208,7 +208,7 @@ // FeoDIRNAMEEXTDLL: "-out:foo.dir{{[/\\]+}}a.ext" // FeoDIRNAMEEXTDLL: "-implib:foo.dir{{[/\\]+}}a.lib" -// RUN: not %clang_cl -### /o 2>&1 | FileCheck -check-prefix=FeoMISSINGARG %s +// RUN: %clang_cl -### /o 2>&1 | FileCheck -check-prefix=FeoMISSINGARG %s // FeoMISSINGARG: error: argument to '/o' is missing (expected 1 value) // RUN: %clang_cl /ofoo /o bar -### -- %s 2>&1 | FileCheck -check-prefix=FeoOVERRIDE %s diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c index bad49942a4c..c54c618df11 100644 --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/test/Driver/clang_f_opts.c @@ -186,7 +186,7 @@ // CHECK-NO-SLP-VECTORIZE-AGG-NOT: "-vectorize-slp-aggressive" // RUN: %clang -### -S -fextended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-EXTENDED-IDENTIFIERS %s -// RUN: not %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s +// RUN: %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s // CHECK-EXTENDED-IDENTIFIERS: "-cc1" // CHECK-EXTENDED-IDENTIFIERS-NOT: "-fextended-identifiers" // CHECK-NO-EXTENDED-IDENTIFIERS: error: unsupported option '-fno-extended-identifiers' diff --git a/clang/test/Driver/cuda-external-tools.cu b/clang/test/Driver/cuda-external-tools.cu index 809b8507683..f0f5c154c97 100644 --- a/clang/test/Driver/cuda-external-tools.cu +++ b/clang/test/Driver/cuda-external-tools.cu @@ -24,8 +24,8 @@ // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix DBG %s // --no-cuda-noopt-device-debug overrides --cuda-noopt-device-debug. -// RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-device-debug \ -// RUN: --no-cuda-noopt-device-debug -O2 -c %s 2>&1 \ +// RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-debug \ +// RUN: --no-cuda-noopt-debug -O2 -c %s 2>&1 \ // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s // Regular compile without -O. This should result in us passing -O0 to ptxas. diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c index b4a2e909b3a..74deb414fc5 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: not %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=G_ERR %s +// RUN: %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=G_NO %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,8 +171,6 @@ // G_PS4: "-dwarf-version= // G_PS4: "-generate-arange-section" // -// G_ERR: error: unknown argument: -// // G_NO: "-cc1" // G_NO-NOT: -debug-info-kind= // diff --git a/clang/test/Driver/gfortran.f90 b/clang/test/Driver/gfortran.f90 index d2f90b47a39..e687e51b4df 100644 --- a/clang/test/Driver/gfortran.f90 +++ b/clang/test/Driver/gfortran.f90 @@ -106,6 +106,7 @@ ! RUN: -fsyntax-only \ ! RUN: -funderscoring \ ! RUN: -fwhole-file \ +! RUN: -fworking-directory \ ! RUN: -imultilib \ ! RUN: -iprefix \ ! RUN: -iquote \ @@ -225,6 +226,7 @@ ! CHECK: "-fstack-arrays" ! CHECK: "-funderscoring" ! CHECK: "-fwhole-file" +! CHECK: "-fworking-directory" ! CHECK: "-imultilib" ! CHECK: "-iprefix" ! CHECK: "-iquote" diff --git a/clang/test/Driver/split-debug.h b/clang/test/Driver/split-debug.h index a27ebb2e6f1..bb05f30b675 100644 --- a/clang/test/Driver/split-debug.h +++ b/clang/test/Driver/split-debug.h @@ -3,4 +3,13 @@ // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -fmodules -### %s 2> %t // RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s // +// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -fmodules -emit-module -fmodules-embed-all-files -fno-implicit-modules -fno-implicit-module-maps -### %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s +// +// FIXME: This should fail using clang, except that the type of the output for +// an object output with modules is given as clang::driver::types::TY_PCH +// rather than TY_Object. +// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -fmodules -fmodule-format=obj -### %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s +// // CHECK-NO-ACTIONS-NOT: objcopy diff --git a/clang/test/Driver/unknown-arg.c b/clang/test/Driver/unknown-arg.c index 9bba74a942e..755d29f1089 100644 --- a/clang/test/Driver/unknown-arg.c +++ b/clang/test/Driver/unknown-arg.c @@ -1,8 +1,8 @@ -// RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -### 2>&1 | \ +// RUN: %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -### 2>&1 | \ // RUN: FileCheck %s // RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -### -c -- %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=CL -// RUN: not %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -c -Werror=unknown-argument -### -- %s 2>&1 | \ +// RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -c -Werror=unknown-argument -### -- %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=CL-ERROR // RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -c -Wno-unknown-argument -### -- %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=SILENT |