[test] Fix unused check prefixes in test/Driver
authorFangrui Song <i@maskray.me>
Sat, 31 Oct 2020 07:14:59 +0000 (00:14 -0700)
committerFangrui Song <i@maskray.me>
Sat, 31 Oct 2020 07:14:59 +0000 (00:14 -0700)
Note, the deprecated AArch64 -msign-return-address= does not accept b-key. So
delete the incorrect tests.

clang/test/Driver/aarch64-security-options.c
clang/test/Driver/arch-specific-libdir-rpath.c
clang/test/Driver/arm-execute-only.c
clang/test/Driver/cl-denorms-are-zero.cl
clang/test/Driver/fopenmp.c
clang/test/Driver/fsanitize-blacklist.c
clang/test/Driver/fuzzer.c
clang/test/Driver/hip-phases.hip
clang/test/Driver/rocm-detect.cl
clang/test/Driver/rocm-detect.hip

index 9ba5067..00ea1f4 100644 (file)
@@ -9,15 +9,6 @@
 // RUN: %clang -target aarch64--none-eabi -c %s -### -msign-return-address=all                              2>&1 | \
 // RUN: FileCheck %s --check-prefix=RA-ALL      --check-prefix=KEY-A --check-prefix=BTE-OFF
 
-// Check that the -msign-return-address= option can also accept the signing key
-// to use.
-
-// RUN: %clang -target aarch64--none-eabi -c %s -### -msign-return-address=non-leaf                   2>&1 | \
-// RUN: FileCheck %s --check-prefix=RA-NON-LEAF --check-prefix=KEY-B --check-prefix=BTE-OFF
-
-// RUN: %clang -target aarch64--none-eabi -c %s -### -msign-return-address=all                        2>&1 | \
-// RUN: FileCheck %s --check-prefix=RA-ALL      --check-prefix=KEY-B --check-prefix=BTE-OFF
-
 // -mbranch-protection with standard
 // RUN: %clang -target aarch64--none-eabi -c %s -### -mbranch-protection=standard                                2>&1 | \
 // RUN: FileCheck %s --check-prefix=RA-NON-LEAF --check-prefix=KEY-A --check-prefix=BTE-ON
index 2ea41aa..1aa5bc8 100644 (file)
@@ -84,7 +84,7 @@
 // NO-RPATH-X86_64-NOT:   "-rpath" "[[RESDIR]]{{(/|\\\\)lib(/|\\\\)linux(/|\\\\)x86_64}}"
 //
 // LIBPATH-AARCH64: -L[[RESDIR]]{{(/|\\\\)lib(/|\\\\)linux(/|\\\\)aarch64}}
-// RPATH-AAARCH4:   "-rpath" "[[RESDIR]]{{(/|\\\\)lib(/|\\\\)linux(/|\\\\)aarch64}}"
+// RPATH-AARCH64:   "-rpath" "[[RESDIR]]{{(/|\\\\)lib(/|\\\\)linux(/|\\\\)aarch64}}"
 //
 // NO-LIBPATH-NOT: "-L{{[^"]*Inputs(/|\\\\)resource_dir}}"
 // NO-RPATH-NOT:   "-rpath" {{.*(/|\\\\)Inputs(/|\\\\)resource_dir}}
index c73785d..81b822f 100644 (file)
@@ -11,7 +11,7 @@
 // CHECK-EXECUTE-ONLY-LONG-CALLS: error: option '-mexecute-only' cannot be specified with '-mlong-calls'
 
 // RUN: %clang -target armv7m-eabi -x assembler -mexecute-only %s -c -### 2>&1 \
-// RUN:    | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY -check-prefix CHECK-NO-EXECUTE-ONLY-ASM
+// RUN:    | FileCheck %s --check-prefix=CHECK-NO-EXECUTE-ONLY-ASM
 // CHECK-NO-EXECUTE-ONLY-ASM: warning: argument unused during compilation: '-mexecute-only'
 
 // -mpure-code flag for GCC compatibility
index e3fd095..31c1be8 100644 (file)
@@ -18,6 +18,7 @@
 // RUN: %clang -### -target amdgcn--amdhsa -nogpulib -c %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-DENORM %s
 // RUN: %clang -### -cl-denorms-are-zero -o - -target amdgcn--amdhsa -nogpulib -c %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
 
+// AMDGCN: "-triple" "amdgcn-unknown-amdhsa"
 // AMDGCN-FLUSH: "-fdenormal-fp-math-f32=preserve-sign,preserve-sign"
 
 // This should be omitted and default to ieee
index c45dbaf..b467fbe 100644 (file)
 // CHECK-LD-STATIC-GOMP: "{{.*}}ld{{(.exe)?}}"
 // CHECK-LD-STATIC-GOMP: "-Bstatic" "-lgomp" "-Bdynamic"
 // CHECK-LD-STATIC-GOMP-RT: "-lrt"
-// CHECK-LD-STATIC-NO-GOMP-RT-NOT: "-lrt"
+// CHECK-LD-STATIC-GOMP-NO-RT-NOT: "-lrt"
 //
 // CHECK-LD-STATIC-IOMP5: "{{.*}}ld{{(.exe)?}}"
 // CHECK-LD-STATIC-IOMP5: "-Bstatic" "-liomp5" "-Bdynamic"
index 254421c..f332161 100644 (file)
@@ -30,7 +30,7 @@
 // CHECK-DEFAULT-UBSAN-BLACKLIST: -fsanitize-system-blacklist={{.*}}ubsan_blacklist.txt
 
 // Check that combining ubsan and another sanitizer results in both blacklists being used.
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined,address -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DEFAULT-UBSAN-BLACKLIST --check-prefix=CHECK-DEFAULT-ASAN-BLACKLIST --implicit-check-not=fdepfile-entry --implicit-check-not=-fsanitize-blacklist=
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined,address -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DEFAULT-UBSAN-BLACKLIST --check-prefix=CHECK-DEFAULT-BLACKLIST-ASAN --implicit-check-not=fdepfile-entry --implicit-check-not=-fsanitize-blacklist=
 
 // Ignore -fsanitize-blacklist flag if there is no -fsanitize flag.
 // RUN: %clang -target x86_64-linux-gnu -fsanitize-blacklist=%t.good %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SANITIZE --check-prefix=DELIMITERS
index d91dd57..de1d51d 100644 (file)
@@ -1,12 +1,12 @@
 // Test flags inserted by -fsanitize=fuzzer.
 
-// RUN: %clang -fsanitize=fuzzer %s -target x86_64-apple-darwin14 -### 2>&1 | FileCheck --check-prefixes=CHECK-FUZZER-LIB,CHECK-COVERAGE-FLAGS %s
+// RUN: %clang -fsanitize=fuzzer %s -target x86_64-apple-darwin14 -### 2>&1 | FileCheck --check-prefixes=CHECK-FUZZER-LIB,CHECK-COVERAGE %s
 //
-// CHECK-FUZZER-LIB: libclang_rt.fuzzer
-// CHECK-COVERAGE: -fsanitize-coverage-inline-8bit-counters
-// CHECK-COVERAGE-SAME: -fsanitize-coverage-indirect-calls
+// CHECK-COVERAGE:      -fsanitize-coverage-indirect-calls
 // CHECK-COVERAGE-SAME: -fsanitize-coverage-trace-cmp
+// CHECK-COVERAGE-SAME: -fsanitize-coverage-inline-8bit-counters
 // CHECK-COVERAGE-SAME: -fsanitize-coverage-pc-table
+// CHECK-FUZZER-LIB: libclang_rt.fuzzer
 
 // RUN: %clang -fsanitize=fuzzer -target i386-unknown-linux -stdlib=platform %s -### 2>&1 | FileCheck --check-prefixes=CHECK-LIBCXX-LINUX %s
 //
index 241448d..b4d1f3a 100644 (file)
@@ -98,7 +98,7 @@
 //
 // RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \
 // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s -fgpu-rdc 2>&1 \
-// RUN: | FileCheck -check-prefixes=RDC2,CL2,RCL2 %s
+// RUN: | FileCheck -check-prefixes=RDC2,RCL2 %s
 
 // RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \
 // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s -fgpu-rdc -c 2>&1 \
index 2fac3aa..94a4068 100644 (file)
 
 // RUN: %clang -### -v -target amdgcn-amd-amdhsa -mcpu=gfx902 -nogpulib \
 // RUN:   --rocm-path=%S/Inputs/rocm %s 2>&1 \
-// RUN:   | FileCheck -check-prefixes=COMMON,GFX902,NODEFAULTLIBS %s
-
+// RUN:   | FileCheck -check-prefixes=COMMON,NODEFAULTLIBS %s
 
 // GFX902-DEFAULTLIBS: error: cannot find ROCm device library for gfx902. Provide its path via --rocm-path or --rocm-device-lib-path, or pass -nogpulib to build without ROCm device library
 
 // NODEFAULTLIBS-NOT: error: cannot find
+
+// COMMON: "-triple" "amdgcn-amd-amdhsa"
index 3a3a028..a329a98 100644 (file)
 
 // RUN: %clang -### -v -target x86_64-linux-gnu --cuda-gpu-arch=gfx902 -nogpulib \
 // RUN:   --rocm-path=%S/Inputs/rocm %s 2>&1 \
-// RUN:   | FileCheck -check-prefixes=COMMON,GFX902,NODEFAULTLIBS %s
+// RUN:   | FileCheck -check-prefixes=COMMON,NODEFAULTLIBS %s
 
 
 // GFX902-DEFAULTLIBS: error: cannot find ROCm device library for gfx902. Provide its path via --rocm-path or --rocm-device-lib-path, or pass -nogpulib to build without ROCm device library
 
 // NODEFAULTLIBS-NOT: error: cannot find
+
+// COMMON: "-triple" "amdgcn-amd-amdhsa"