aboutsummaryrefslogtreecommitdiff
path: root/test/Driver
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver')
-rw-r--r--test/Driver/ccc-add-args.c6
-rw-r--r--test/Driver/clang-translation.c32
-rw-r--r--test/Driver/clang_f_opts.c23
-rw-r--r--test/Driver/cxx-pth.cpp4
-rw-r--r--test/Driver/dragonfly.c2
-rw-r--r--test/Driver/freebsd.c2
-rw-r--r--test/Driver/hello.c2
-rw-r--r--test/Driver/openbsd.c2
-rw-r--r--test/Driver/parsing.c24
-rw-r--r--test/Driver/pth.c4
-rw-r--r--test/Driver/qa_override.c7
11 files changed, 74 insertions, 34 deletions
diff --git a/test/Driver/ccc-add-args.c b/test/Driver/ccc-add-args.c
index 21e4471c1276..afd9bd6f7650 100644
--- a/test/Driver/ccc-add-args.c
+++ b/test/Driver/ccc-add-args.c
@@ -1,3 +1,5 @@
// RUN: env CCC_ADD_ARGS="-ccc-echo,-ccc-print-options,,-v" clang -### 2>&1 | FileCheck %s
-// CHECK: Option 0 - Name: "-v", Values: {}
-// CHECK: Option 1 - Name: "-###", Values: {}
+// CHECK: Option 0 - Name: "-ccc-echo", Values: {}
+// CHECK: Option 1 - Name: "-ccc-print-options", Values: {}
+// CHECK: Option 2 - Name: "-v", Values: {}
+// CHECK: Option 3 - Name: "-###", Values: {}
diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c
index f7f8b5ef5f80..762ebb7944b2 100644
--- a/test/Driver/clang-translation.c
+++ b/test/Driver/clang-translation.c
@@ -1,4 +1,4 @@
-// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables 2> %t.log
+// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2> %t.log
// RUN: grep '"-triple" "i386-unknown-unknown"' %t.log
// RUN: grep '"-S"' %t.log
// RUN: grep '"-disable-free"' %t.log
@@ -8,7 +8,37 @@
// RUN: grep '"-Os"' %t.log
// RUN: grep '"-o" .*clang-translation.*' %t.log
// RUN: grep '"-masm-verbose"' %t.log
+// RUN: grep '"-fvisibility" "hidden"' %t.log
// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log
// RUN: grep '"-mcpu" "yonah"' %t.log
// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log
// RUN: grep '"-mcpu" "core2"' %t.log
+
+// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \
+// RUN: -arch armv7
+// RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s < %t.log
+// ARMV7_DEFAULT: clang
+// ARMV7_DEFAULT: "-cc1"
+// ARMV7_DEFAULT-NOT: "-msoft-float"
+// ARMV7_DEFAULT: "-mfloat-abi" "soft"
+// ARMV7_DEFAULT-NOT: "-msoft-float"
+// ARMV7_DEFAULT: "-x" "c"
+
+// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \
+// RUN: -arch armv7 -msoft-float
+// RUN: FileCheck -check-prefix=ARMV7_SOFTFLOAT %s < %t.log
+// ARMV7_SOFTFLOAT: clang
+// ARMV7_SOFTFLOAT: "-cc1"
+// ARMV7_SOFTFLOAT: "-msoft-float"
+// ARMV7_SOFTFLOAT: "-mfloat-abi" "soft"
+// ARMV7_SOFTFLOAT: "-x" "c"
+
+// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \
+// RUN: -arch armv7 -mhard-float
+// RUN: FileCheck -check-prefix=ARMV7_HARDFLOAT %s < %t.log
+// ARMV7_HARDFLOAT: clang
+// ARMV7_HARDFLOAT: "-cc1"
+// ARMV7_HARDFLOAT-NOT: "-msoft-float"
+// ARMV7_HARDFLOAT: "-mfloat-abi" "hard"
+// ARMV7_HARDFLOAT-NOT: "-msoft-float"
+// ARMV7_HARDFLOAT: "-x" "c"
diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c
index 3756a2f4d163..66853422dd1d 100644
--- a/test/Driver/clang_f_opts.c
+++ b/test/Driver/clang_f_opts.c
@@ -1,9 +1,14 @@
-// RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2> %t
-// RUN: grep -F '"-fblocks"' %t
-// RUN: grep -F '"-fpascal-strings"' %t
-// RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-wchar %s 2> %t
-// RUN: grep -F '"-fno-builtin"' %t
-// RUN: grep -F '"-fno-common"' %t
-// RUN: grep -F '"-fno-math-errno"' %t
-// RUN: grep -F '"-fno-show-source-location"' %t
-// RUN: grep -F '"-fshort-wchar"' %t
+// RUN: clang -### -S -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s
+// RUN: clang -### -S -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s
+// RUN: clang -### -fshort-enums %s 2>&1 | FileCheck -check-prefix=CHECK-SHORT-ENUMS %s
+
+// CHECK-OPTIONS1: -fblocks
+// CHECK-OPTIONS1: -fpascal-strings
+
+// CHECK-OPTIONS2: -fno-math-errno
+// CHECK-OPTIONS2: -fno-builtin
+// CHECK-OPTIONS2: -fshort-wchar
+// CHECK-OPTIONS2: -fno-common
+// CHECK-OPTIONS2: -fno-show-source-location
+
+// CHECK-SHORT-ENUMS: compiler does not support '-fshort-enums'
diff --git a/test/Driver/cxx-pth.cpp b/test/Driver/cxx-pth.cpp
index 508696ade885..e5b69c118fb3 100644
--- a/test/Driver/cxx-pth.cpp
+++ b/test/Driver/cxx-pth.cpp
@@ -3,10 +3,10 @@
// RUN: clang -x c++-header %s -### 2> %t.log
// RUN: FileCheck -check-prefix EMIT -input-file %t.log %s
-// EMIT: "{{.*}}/clang-cc{{.*}}" {{.*}} "-emit-pth" "{{.*}}.cpp.gch" "-x" "c++-header" "{{.*}}.cpp"
+// EMIT: "{{.*}}/clang{{.*}}" {{.*}} "-emit-pth" "{{.*}}.cpp.gch" "-x" "c++-header" "{{.*}}.cpp"
// RUN: touch %t.h.gch
// RUN: clang -E -include %t.h %s -### 2> %t.log
// RUN: FileCheck -check-prefix USE -input-file %t.log %s
-// USE: "{{.*}}/clang-cc{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.gch" {{.*}}"-x" "c++" "{{.*}}.cpp"
+// USE: "{{.*}}/clang{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.gch" {{.*}}"-x" "c++" "{{.*}}.cpp"
diff --git a/test/Driver/dragonfly.c b/test/Driver/dragonfly.c
index 40f12e4d7f86..2eb3b1808ee8 100644
--- a/test/Driver/dragonfly.c
+++ b/test/Driver/dragonfly.c
@@ -1,7 +1,7 @@
// RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log
// RUN: FileCheck -input-file %t.log %s
-// CHECK: clang-cc{{.*}}" "-triple" "amd64-pc-dragonfly"
+// CHECK: clang{{.*}}" "-cc1" "-triple" "amd64-pc-dragonfly"
// CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s
// CHECK: ld{{.*}}" "-dynamic-linker" "{{.*}}ld-elf.{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-L{{.*}}/gcc{{.*}}" {{.*}} "-lc" "-lgcc" "{{.*}}crtend.o" "{{.*}}crtn.o"
diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c
index 8c03bbcfe3d6..9700540f46bb 100644
--- a/test/Driver/freebsd.c
+++ b/test/Driver/freebsd.c
@@ -2,6 +2,6 @@
// RUN: cat %t.log
// RUN: FileCheck -input-file %t.log %s
-// CHECK: clang-cc{{.*}}" "-triple" "powerpc64-pc-freebsd8"
+// CHECK: clang{{.*}}" "-cc1" "-triple" "powerpc64-pc-freebsd8"
// CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s
// CHECK: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld-elf{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "{{.*}}crtend.o" "{{.*}}crtn.o"
diff --git a/test/Driver/hello.c b/test/Driver/hello.c
index 0df1341e4ea8..e1b6f1a0fd7a 100644
--- a/test/Driver/hello.c
+++ b/test/Driver/hello.c
@@ -1,7 +1,7 @@
// RUN: clang -ccc-echo -o %t %s 2> %t.log
// Make sure we used clang.
-// RUN: grep 'clang-cc" .*hello.c' %t.log
+// RUN: grep 'clang" -cc1 .*hello.c' %t.log
// RUN: %t > %t.out
// RUN: grep "I'm a little driver, short and stout." %t.out
diff --git a/test/Driver/openbsd.c b/test/Driver/openbsd.c
index 8b0706b28fdc..97ba30bb69c2 100644
--- a/test/Driver/openbsd.c
+++ b/test/Driver/openbsd.c
@@ -1,6 +1,6 @@
// RUN: clang -ccc-clang-archs "" -ccc-host-triple i686-pc-openbsd %s -### 2> %t.log
// RUN: FileCheck -input-file %t.log %s
-// CHECK: clang-cc{{.*}}" "-triple" "i686-pc-openbsd"
+// CHECK: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
// CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s
// CHECK: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o"
diff --git a/test/Driver/parsing.c b/test/Driver/parsing.c
index 8e37128e3ed9..48b9d6a23f1f 100644
--- a/test/Driver/parsing.c
+++ b/test/Driver/parsing.c
@@ -1,14 +1,15 @@
// RUN: clang -ccc-print-options input -Yunknown -m32 -arch ppc -djoined -A separate -Ajoined -Wp,one,two -Xarch_joined AndSeparate -sectalign 1 2 3 2> %t
-// RUN: grep 'Option 0 - Name: "<input>", Values: {"input"}' %t
-// RUN: grep 'Option 1 - Name: "<unknown>", Values: {"-Yunknown"}' %t
-// RUN: grep 'Option 2 - Name: "-m32", Values: {}' %t
-// RUN: grep 'Option 3 - Name: "-arch", Values: {"ppc"}' %t
-// RUN: grep 'Option 4 - Name: "-d", Values: {"joined"}' %t
-// RUN: grep 'Option 5 - Name: "-A", Values: {"separate"}' %t
-// RUN: grep 'Option 6 - Name: "-A", Values: {"joined"}' %t
-// RUN: grep 'Option 7 - Name: "-Wp,", Values: {"one", "two"}' %t
-// RUN: grep 'Option 8 - Name: "-Xarch_", Values: {"joined", "AndSeparate"}' %t
-// RUN: grep 'Option 9 - Name: "-sectalign", Values: {"1", "2", "3"}' %t
+// RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t
+// RUN: grep 'Option 1 - Name: "<input>", Values: {"input"}' %t
+// RUN: grep 'Option 2 - Name: "<unknown>", Values: {"-Yunknown"}' %t
+// RUN: grep 'Option 3 - Name: "-m32", Values: {}' %t
+// RUN: grep 'Option 4 - Name: "-arch", Values: {"ppc"}' %t
+// RUN: grep 'Option 5 - Name: "-d", Values: {"joined"}' %t
+// RUN: grep 'Option 6 - Name: "-A", Values: {"separate"}' %t
+// RUN: grep 'Option 7 - Name: "-A", Values: {"joined"}' %t
+// RUN: grep 'Option 8 - Name: "-Wp,", Values: {"one", "two"}' %t
+// RUN: grep 'Option 9 - Name: "-Xarch_", Values: {"joined", "AndSeparate"}' %t
+// RUN: grep 'Option 10 - Name: "-sectalign", Values: {"1", "2", "3"}' %t
// RUN: not clang -V 2> %t
// RUN: grep "error: argument to '-V' is missing (expected 1 value)" %t
@@ -17,7 +18,8 @@
// Verify that search continues after find the first option.
// RUN: clang -ccc-print-options -Wally 2> %t
-// RUN: grep 'Option 0 - Name: "-W", Values: {"ally"}' %t
+// RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t
+// RUN: grep 'Option 1 - Name: "-W", Values: {"ally"}' %t
diff --git a/test/Driver/pth.c b/test/Driver/pth.c
index 8e8b2dda32ba..938675a900d8 100644
--- a/test/Driver/pth.c
+++ b/test/Driver/pth.c
@@ -3,10 +3,10 @@
// RUN: clang -ccc-pch-is-pth -x c-header %s -o %t.h.pth -### 2> %t.log
// RUN: FileCheck -check-prefix CHECK1 -input-file %t.log %s
-// CHECK1: "{{.*}}/clang-cc{{.*}}" {{.*}} "-o" "{{.*}}.h.pth" "-x" "c-header" "{{.*}}pth.c"
+// CHECK1: "{{.*}}/clang{{.*}}" "-cc1" {{.*}} "-o" "{{.*}}.h.pth" "-x" "c-header" "{{.*}}pth.c"
// RUN: touch %t.h.pth
// RUN: clang -ccc-pch-is-pth -E -include %t.h %s -### 2> %t.log
// RUN: FileCheck -check-prefix CHECK2 -input-file %t.log %s
-// CHECK2: "{{.*}}/clang-cc{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c"
+// CHECK2: "{{.*}}/clang{{.*}}" "-cc1" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c"
diff --git a/test/Driver/qa_override.c b/test/Driver/qa_override.c
index 6f72078f12af..822410659ead 100644
--- a/test/Driver/qa_override.c
+++ b/test/Driver/qa_override.c
@@ -1,5 +1,6 @@
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-ccc-print-options " clang x -O2 b -O3 2>&1 | FileCheck %s
// CHECK-NOT: ###
-// CHECK: Option 0 - Name: "<input>", Values: {"x"}
-// CHECK-NEXT: Option 1 - Name: "-O", Values: {"ignore"}
-// CHECK-NEXT: Option 2 - Name: "-O", Values: {"magic"}
+// CHECK: Option 0 - Name: "-ccc-print-options", Values: {}
+// CHECK-NEXT: Option 1 - Name: "<input>", Values: {"x"}
+// CHECK-NEXT: Option 2 - Name: "-O", Values: {"ignore"}
+// CHECK-NEXT: Option 3 - Name: "-O", Values: {"magic"}