Author: Fangrui Song Date: 2022-05-02T09:35:58-07:00 New Revision: 46cc04de341bceef319144fa11b0d421d29c5451
URL: https://github.com/llvm/llvm-project/commit/46cc04de341bceef319144fa11b0d421d29c5451 DIFF: https://github.com/llvm/llvm-project/commit/46cc04de341bceef319144fa11b0d421d29c5451.diff LOG: [Driver][test] Add back some -no-canonical-prefixes To make them meaningful, it's useful to check "clang". Use -no-canonical-prefixes to support distributions that symlink %clang to an executable with a filename not ending in "clang". Added: Modified: clang/test/Driver/cc-log-diagnostics.c clang/test/Driver/cc-print-proc-stat.c clang/test/Driver/compilation_database.c Removed: ################################################################################ diff --git a/clang/test/Driver/cc-log-diagnostics.c b/clang/test/Driver/cc-log-diagnostics.c index c1e3fce4d8021..22d3389553ce6 100644 --- a/clang/test/Driver/cc-log-diagnostics.c +++ b/clang/test/Driver/cc-log-diagnostics.c @@ -10,7 +10,7 @@ int f0(void) {} // CHECK: <key>main-file</key> // CHECK: <string>{{.*}}cc-log-diagnostics.c</string> // CHECK: <key>dwarf-debug-flags</key> -// CHECK: <string>{{.*}}clang{{.*}}-fsyntax-only{{.*}}</string> +// CHECK: <string>{{.*}}-Wfoobar{{.*}}-fsyntax-only{{.*}}</string> // CHECK: <key>diagnostics</key> // CHECK: <array> // CHECK: <dict> diff --git a/clang/test/Driver/cc-print-proc-stat.c b/clang/test/Driver/cc-print-proc-stat.c index 61297862ddd3b..c1f96a69e1e73 100644 --- a/clang/test/Driver/cc-print-proc-stat.c +++ b/clang/test/Driver/cc-print-proc-stat.c @@ -1,9 +1,9 @@ // RUN: env CC_PRINT_PROC_STAT=1 \ // RUN: CC_PRINT_PROC_STAT_FILE=%t.csv \ -// RUN: %clang -S -o %t.s %s +// RUN: %clang -no-canonical-prefixes -S -o %t.s %s // RUN: FileCheck --check-prefix=CHECK-CSV %s < %t.csv // CHECK-CSV: clang{{.*}},"{{.*}}.s",{{[0-9]+}},{{[0-9]+}},{{[0-9]+}} // RUN: env CC_PRINT_PROC_STAT=1 \ -// RUN: %clang -c -fintegrated-as %s | FileCheck %s +// RUN: %clang -no-canonical-prefixes -c -fintegrated-as %s | FileCheck %s // CHECK: clang{{.*}}: output={{.*}}.o, total={{[0-9.]+}} ms, user={{[0-9.]+}} ms, mem={{[0-9]+}} Kb diff --git a/clang/test/Driver/compilation_database.c b/clang/test/Driver/compilation_database.c index cb0960d565928..19224d22de044 100644 --- a/clang/test/Driver/compilation_database.c +++ b/clang/test/Driver/compilation_database.c @@ -1,9 +1,9 @@ // RUN: mkdir -p %t.workdir && cd %t.workdir -// RUN: %clang -fintegrated-as -MD -MP --sysroot=somewhere -c -x c %s -xc++ %s -Wall -MJ - 2>&1 | FileCheck %s -// RUN: not %clang -c -x c %s -MJ %s/non-existant 2>&1 | FileCheck --check-prefix=ERROR %s +// RUN: %clang -no-canonical-prefixes -fintegrated-as -MD -MP --sysroot=somewhere -c -x c %s -xc++ %s -Wall -MJ - 2>&1 | FileCheck %s +// RUN: not %clang -no-canonical-prefixes -c -x c %s -MJ %s/non-existant 2>&1 | FileCheck --check-prefix=ERROR %s -// CHECK: { "directory": "{{[^"]*}}workdir", "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc", "[[SRC]]", "-fintegrated-as", "--sysroot=somewhere", "-c", "-Wall",{{.*}} "--target={{[^"]+}}"]}, -// CHECK: { "directory": "{{.*}}", "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc++", "[[SRC]]", "-fintegrated-as", "--sysroot=somewhere", "-c", "-Wall",{{.*}} "--target={{[^"]+}}"]}, +// CHECK: { "directory": "{{[^"]*}}workdir", "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc", "[[SRC]]", "-no-canonical-prefixes", "-fintegrated-as", "--sysroot=somewhere", "-c", "-Wall",{{.*}} "--target={{[^"]+}}"]}, +// CHECK: { "directory": "{{.*}}", "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc++", "[[SRC]]", "-no-canonical-prefixes", "-fintegrated-as", "--sysroot=somewhere", "-c", "-Wall",{{.*}} "--target={{[^"]+}}"]}, // ERROR: error: compilation database '{{.*}}/non-existant' could not be opened: int main(void) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits