MaskRay created this revision.
MaskRay added reviewers: DiggerLin, hubert.reinterpretcast, jasonliu, stevewan, 
Xiangling_L.
Herald added a reviewer: ctetreau.
MaskRay requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

- For `-###`, `-o %t.o` is unnecessary if we don't specifically test the output 
filename.
- --target= is the canonical spelling. -target is a legacy spelling which 
unfortunately cannot be removed because there are too many uses.
- -no-canonical-prefixes uses the dereferenced absolute path for the cc1 
command. For most tests "-cc1" is sufficient to identify the command line, no 
need to specifically test the "clang" command, and -no-canonical-prefixes can 
removed.
- --unwindlib= is the preferred spelling. -u is a short option taking a value, 
which means a -uwindlib= typo cannot be detected.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119309

Files:
  clang/test/Driver/aix-as.c
  clang/test/Driver/aix-ld.c

Index: clang/test/Driver/aix-ld.c
===================================================================
--- clang/test/Driver/aix-ld.c
+++ clang/test/Driver/aix-ld.c
@@ -2,14 +2,14 @@
 // sysroot to make these tests independent of the host system.
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32 %s
 // CHECK-LD32-NOT: warning:
-// CHECK-LD32:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32:     "{{.*}}ld{{(.exe)?}}"
@@ -28,14 +28,14 @@
 // CHECK-LD32:     "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD64 %s
 // CHECK-LD64-NOT: warning:
-// CHECK-LD64:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64:     "{{.*}}ld{{(.exe)?}}"
@@ -54,15 +54,15 @@
 // CHECK-LD64:     "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Enable POSIX thread support.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -pthread \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-PTHREAD %s
 // CHECK-LD32-PTHREAD-NOT: warning:
-// CHECK-LD32-PTHREAD:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-PTHREAD:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-PTHREAD:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-PTHREAD:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-PTHREAD:     "{{.*}}ld{{(.exe)?}}"
@@ -82,15 +82,15 @@
 // CHECK-LD32-PTHREAD:     "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. POSIX thread alias.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -pthreads \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD64-PTHREAD %s
 // CHECK-LD64-PTHREAD-NOT: warning:
-// CHECK-LD64-PTHREAD:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64-PTHREAD:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64-PTHREAD:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64-PTHREAD:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64-PTHREAD:     "{{.*}}ld{{(.exe)?}}"
@@ -110,15 +110,15 @@
 // CHECK-LD64-PTHREAD:     "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Enable profiling.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -p \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-PROF %s
 // CHECK-LD32-PROF-NOT: warning:
-// CHECK-LD32-PROF:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-PROF:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-PROF:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-PROF:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-PROF:     "{{.*}}ld{{(.exe)?}}"
@@ -137,15 +137,15 @@
 // CHECK-LD32-PROF:     "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. Enable g-profiling.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -pg \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD64-GPROF %s
 // CHECK-LD64-GPROF-NOT: warning:
-// CHECK-LD64-GPROF:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64-GPROF:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64-GPROF:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64-GPROF:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64-GPROF:     "{{.*}}ld{{(.exe)?}}"
@@ -164,15 +164,15 @@
 // CHECK-LD64-GPROF:     "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Static linking.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -static \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-STATIC %s
 // CHECK-LD32-STATIC-NOT: warning:
-// CHECK-LD32-STATIC:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-STATIC:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-STATIC:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-STATIC:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-STATIC:     "{{.*}}ld{{(.exe)?}}"
@@ -191,15 +191,15 @@
 // CHECK-LD32-STATIC:     "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Library search path.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -L%S/Inputs/aix_ppc_tree/powerpc-ibm-aix7.1.0.0 \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-LIBP %s
 // CHECK-LD32-LIBP-NOT: warning:
-// CHECK-LD32-LIBP:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-LIBP:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-LIBP:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-LIBP:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-LIBP:     "{{.*}}ld{{(.exe)?}}"
@@ -219,15 +219,15 @@
 // CHECK-LD32-LIBP:     "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. nostdlib.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nostdlib \
 // RUN:        -pthread \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-NO-STD-LIB %s
 // CHECK-LD32-NO-STD-LIB-NOT: warning:
-// CHECK-LD32-NO-STD-LIB:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-NO-STD-LIB:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-NO-STD-LIB:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-NO-STD-LIB:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-NO-STD-LIB:     "{{.*}}ld{{(.exe)?}}"
@@ -247,15 +247,15 @@
 // CHECK-LD32-NO-STD-LIB-NOT: "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. nodefaultlibs.
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nodefaultlibs \
 // RUN:        -pthread \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-LD64-NO-DEFAULT-LIBS %s
 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: warning:
-// CHECK-LD64-NO-DEFAULT-LIBS:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64-NO-DEFAULT-LIBS:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64-NO-DEFAULT-LIBS:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64-NO-DEFAULT-LIBS:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64-NO-DEFAULT-LIBS:     "{{.*}}ld{{(.exe)?}}"
@@ -275,14 +275,14 @@
 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. 'bcdtors' and argument order.
-// RUN: %clang -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clang %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -Wl,-bnocdtors \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-ARG-ORDER %s
-// CHECK-LD32-ARG-ORDER:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-ARG-ORDER:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-ARG-ORDER:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-ARG-ORDER:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-ARG-ORDER:     "{{.*}}ld{{(.exe)?}}"
@@ -304,14 +304,14 @@
 // CHECK-LD32-ARG-ORDER:     "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. 'bcdtors' and argument order.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -Wl,-bnocdtors \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-CXX-ARG-ORDER %s
-// CHECK-LD32-CXX-ARG-ORDER:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-CXX-ARG-ORDER:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-CXX-ARG-ORDER:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-CXX-ARG-ORDER:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-CXX-ARG-ORDER:     "{{.*}}ld{{(.exe)?}}"
@@ -333,13 +333,13 @@
 // CHECK-LD32-CXX-ARG-ORDER:     "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. lc++ and lc order.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-CXX-ARG-LCXX %s
-// CHECK-LD32-CXX-ARG-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-CXX-ARG-LCXX:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-CXX-ARG-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-CXX-ARG-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-CXX-ARG-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -357,13 +357,13 @@
 // CHECK-LD32-CXX-ARG-LCXX:     "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. lc++ and lc order.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD64-CXX-ARG-LCXX %s
-// CHECK-LD64-CXX-ARG-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64-CXX-ARG-LCXX:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64-CXX-ARG-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64-CXX-ARG-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64-CXX-ARG-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -381,14 +381,14 @@
 // CHECK-LD64-CXX-ARG-LCXX:     "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -nodefaultlibs.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nodefaultlibs \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-NODEFLIB-LCXX %s
-// CHECK-LD32-NODEFLIB-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-NODEFLIB-LCXX:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-NODEFLIB-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-NODEFLIB-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-NODEFLIB-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -406,14 +406,14 @@
 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nodefaultlibs.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nodefaultlibs \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD64-NODEFLIB-LCXX %s
-// CHECK-LD64-NODEFLIB-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64-NODEFLIB-LCXX:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64-NODEFLIB-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64-NODEFLIB-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64-NODEFLIB-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -431,14 +431,14 @@
 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -nostdlib.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nostdlib \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-NOSTDLIB-LCXX %s
-// CHECK-LD32-NOSTDLIB-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-NOSTDLIB-LCXX:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-NOSTDLIB-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-NOSTDLIB-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-NOSTDLIB-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -456,14 +456,14 @@
 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nostdlib.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nostdlib \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD64-NOSTDLIB-LCXX %s
-// CHECK-LD64-NOSTDLIB-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64-NOSTDLIB-LCXX:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64-NOSTDLIB-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64-NOSTDLIB-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64-NOSTDLIB-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -482,14 +482,14 @@
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -nostdlib++.
 // Note: crti is still linked for initialization/finalization functionality.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nostdlib++ \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-NOSTDLIBXX-LCXX %s
-// CHECK-LD32-NOSTDLIBXX-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-NOSTDLIBXX-LCXX:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-NOSTDLIBXX-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-NOSTDLIBXX-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-NOSTDLIBXX-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -507,14 +507,14 @@
 // CHECK-LD32-NOSTDLIBXX-LCXX:     "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nostdlib++.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nostdlib++ \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD64-NOSTDLIBXX-LCXX %s
-// CHECK-LD64-NOSTDLIBXX-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64-NOSTDLIBXX-LCXX:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64-NOSTDLIBXX-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64-NOSTDLIBXX-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64-NOSTDLIBXX-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -532,14 +532,14 @@
 // CHECK-LD64-NOSTDLIBXX-LCXX:     "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 32-bit. -nostartfiles.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nostartfiles \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-NOSTARTFILES-LCXX %s
-// CHECK-LD32-NOSTARTFILES-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-NOSTARTFILES-LCXX:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-NOSTARTFILES-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-NOSTARTFILES-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-NOSTARTFILES-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -557,14 +557,14 @@
 // CHECK-LD32-NOSTARTFILES-LCXX:     "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nostartfiles.
-// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -nostartfiles \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-NOSTARTFILES-LCXX %s
-// CHECK-LD64-NOSTARTFILES-LCXX:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64-NOSTARTFILES-LCXX:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64-NOSTARTFILES-LCXX:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64-NOSTARTFILES-LCXX:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64-NOSTARTFILES-LCXX:     "{{.*}}ld{{(.exe)?}}"
@@ -582,29 +582,29 @@
 // CHECK-LD64-NOSTARTFILES-LCXX:     "-lc"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -stdlib=libstdc++ invokes fatal error.
-// RUN: not --crash %clangxx -no-canonical-prefixes %s 2>&1 -### \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN: not --crash %clangxx %s 2>&1 -### \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        -stdlib=libstdc++ -nostdinc++ \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-LD-LIBSTDCXX %s
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -stdlib=libstdc++ invokes fatal error.
-// RUN: not --crash %clangxx -no-canonical-prefixes %s 2>&1 -### \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN: not --crash %clangxx %s 2>&1 -### \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        -stdlib=libstdc++ -nostdinc++ \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-LD-LIBSTDCXX %s
 // CHECK-LD-LIBSTDCXX: LLVM ERROR: linking libstdc++ unimplemented on AIX
 
 // Check powerpc64-ibm-aix7.1.0.0, 32-bit. -shared.
-// RUN: %clangxx -x c++ -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx -x c++ %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -shared \
-// RUN:        -target powerpc-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD32-SHARED %s
-// CHECK-LD32-SHARED:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-LD32-SHARED:     "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-LD32-SHARED:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD32-SHARED:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD32-SHARED:     "{{.*}}ld{{(.exe)?}}"
@@ -624,14 +624,14 @@
 // CHECK-LD32-SHARED:     "-lc"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared.
-// RUN: %clangxx -x c++ -no-canonical-prefixes %s 2>&1 -### \
+// RUN: %clangxx -x c++ %s 2>&1 -### \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -shared \
-// RUN:        -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:        --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-LD64-SHARED %s
-// CHECK-LD64-SHARED:     {{.*}}clang{{.*}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-LD64-SHARED:     "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-LD64-SHARED:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-LD64-SHARED:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-LD64-SHARED:     "{{.*}}ld{{(.exe)?}}"
@@ -651,16 +651,16 @@
 // CHECK-LD64-SHARED:     "-lc"
 
 // Check powerpc-ibm-aix7.3.0.0, -fprofile-generate
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -static \
 // RUN:        -fprofile-generate\
-// RUN:        -target powerpc-ibm-aix7.3.0.0 \
+// RUN:        --target=powerpc-ibm-aix7.3.0.0 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-PGO-NON-LTO %s
 // CHECK-PGO-NON-LTO-NOT: warning:
-// CHECK-PGO-NON-LTO:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.3.0.0"
+// CHECK-PGO-NON-LTO:     "-cc1" "-triple" "powerpc-ibm-aix7.3.0.0"
 // CHECK-PGO-NON-LTO:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-PGO-NON-LTO:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-PGO-NON-LTO:     "{{.*}}ld{{(.exe)?}}"
@@ -678,17 +678,17 @@
 // CHECK-PGO-NON-LTO:     "-lc"
 
 // Check powerpc-ibm-aix7.2.5.3, -fprofile-generate, -flto
-// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN: %clang %s -### 2>&1 \
 // RUN:        -resource-dir=%S/Inputs/resource_dir \
 // RUN:        -static \
 // RUN:        -fprofile-generate\
 // RUN:        -flto\
-// RUN:        -target powerpc-ibm-aix7.2.5.3 \
+// RUN:        --target=powerpc-ibm-aix7.2.5.3 \
 // RUN:        --sysroot %S/Inputs/aix_ppc_tree \
-// RUN:        -unwindlib=libunwind \
+// RUN:        --unwindlib=libunwind \
 // RUN:   | FileCheck --check-prefix=CHECK-PGO-LTO %s
 // CHECK-PGO-LTO-NOT: warning:
-// CHECK-PGO-LTO:     {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.2.5.3"
+// CHECK-PGO-LTO:     "-cc1" "-triple" "powerpc-ibm-aix7.2.5.3"
 // CHECK-PGO-LTO:     "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-PGO-LTO:     "-isysroot" "[[SYSROOT:[^"]+]]"
 // CHECK-PGO-LTO:     "{{.*}}ld{{(.exe)?}}"
Index: clang/test/Driver/aix-as.c
===================================================================
--- clang/test/Driver/aix-as.c
+++ clang/test/Driver/aix-as.c
@@ -2,44 +2,44 @@
 // only test assembler functionalities in this suite.
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit.
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN:         -target powerpc-ibm-aix7.1.0.0 \
+// RUN: %clang %s -### -c 2>&1 \
+// RUN:         --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-AS32 %s
 // CHECK-AS32-NOT: warning:
-// CHECK-AS32: {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-AS32: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-AS32: "{{.*}}as{{(.exe)?}}" 
 // CHECK-AS32: "-a32" 
 // CHECK-AS32: "-many" 
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit.
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN:         -target powerpc64-ibm-aix7.1.0.0 \
+// RUN: %clang %s -### -c 2>&1 \
+// RUN:         --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-AS64 %s
 // CHECK-AS64-NOT: warning:
-// CHECK-AS64: {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-AS64: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-AS64: "{{.*}}as{{(.exe)?}}" 
 // CHECK-AS64: "-a64" 
 // CHECK-AS64: "-many"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -Xassembler <arg> option. 
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
+// RUN: %clang %s -### -c 2>&1 \
 // RUN:         -Xassembler -w \
-// RUN:         -target powerpc-ibm-aix7.1.0.0 \
+// RUN:         --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-AS32-Xassembler %s
 // CHECK-AS32-Xassembler-NOT: warning:
-// CHECK-AS32-Xassembler: {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-AS32-Xassembler: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
 // CHECK-AS32-Xassembler: "{{.*}}as{{(.exe)?}}" 
 // CHECK-AS32-Xassembler: "-a32" 
 // CHECK-AS32-Xassembler: "-many"
 // CHECK-AS32-Xassembler: "-w"
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -Wa,<arg>,<arg> option.
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
+// RUN: %clang %s -### -c 2>&1 \
 // RUN:         -Wa,-v,-w \
-// RUN:         -target powerpc64-ibm-aix7.1.0.0 \
+// RUN:         --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-AS64-Wa %s
 // CHECK-AS64-Wa-NOT: warning:
-// CHECK-AS64-Wa: {{.*}}clang{{(.exe)?}}" "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-AS64-Wa: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
 // CHECK-AS64-Wa: "{{.*}}as{{(.exe)?}}" 
 // CHECK-AS64-Wa: "-a64" 
 // CHECK-AS64-Wa: "-many"
@@ -47,11 +47,11 @@
 // CHECK-AS64-Wa: "-w"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Multiple input files.
-// RUN: %clang -no-canonical-prefixes -### -c \
+// RUN: %clang -### -c \
 // RUN:         %S/Inputs/aix_ppc_tree/dummy0.s \
 // RUN:         %S/Inputs/aix_ppc_tree/dummy1.s \
 // RUN:         %S/Inputs/aix_ppc_tree/dummy2.s 2>&1 \
-// RUN:         -target powerpc-ibm-aix7.1.0.0 \
+// RUN:         --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-AS32-MultiInput %s
 // CHECK-AS32-MultiInput-NOT: warning:
 // CHECK-AS32-MultiInput: "{{.*}}as{{(.exe)?}}"
@@ -65,15 +65,13 @@
 // CHECK-AS32-MultiInput: "-many"
 
 // Check not passing no-integrated-as flag by default.
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN:         -target powerpc64-ibm-aix7.1.0.0 \
+// RUN: %clang %s -### -c 2>&1 --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-IAS --implicit-check-not=-no-integrated-as %s
 // CHECK-IAS: InstalledDir
 // CHECK-IAS: "-a64"
 
 // Check passing no-integrated-as flag if specified by user.
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN:         -target powerpc64-ibm-aix7.1.0.0 -fno-integrated-as \
+// RUN: %clang %s -### -c 2>&1 --target=powerpc64-ibm-aix7.1.0.0 -fno-integrated-as \
 // RUN:   | FileCheck --check-prefix=CHECK-NOIAS %s
 // CHECK-NOIAS: InstalledDir
 // CHECK-NOIAS: -no-integrated-as
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to