Skip to content

Commit 3327747

Browse files
committed
add a driver test for mixed ordering of fdepscan-prefix-map formats
(cherry picked from commit f0ed1e5)
1 parent cc97d2f commit 3327747

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

clang/test/Driver/fdepscan-prefix-map-sdk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
// RUN: %clang -fdepscan-prefix-map-sdk=/^sdk -isysroot /sys/path -### %s 2>&1 | FileCheck %s
77
// RUN: %clang -fdepscan-prefix-map-sdk=/^sdk --sysroot /sys/path -### %s 2>&1 | FileCheck %s
8-
// CHECK: -fdepscan-prefix-map=/sys/path=/^sdk
8+
// CHECK: "-fdepscan-prefix-map" "/sys/path" "/^sdk"

clang/test/Driver/fdepscan-prefix-map-toolchain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// RUN: %clang -fdepscan-prefix-map-toolchain=/^tc -resource-dir /tc/lib/clang/10 -### %s 2>&1 | FileCheck %s
99
// RUN: %clang -fdepscan-prefix-map-toolchain=/^tc -resource-dir /tc/usr/lib/clang/10 -### %s 2>&1 | FileCheck %s
1010

11-
// CHECK: -fdepscan-prefix-map=/tc=/^tc
11+
// CHECK: "-fdepscan-prefix-map" "/tc" "/^tc"
1212

1313
// Implicit resource-dir
1414
// RUN: %clang -fdepscan-prefix-map-toolchain=/^tc -### %s 2>&1 | FileCheck %s -check-prefix=CHECK_IMPLICIT
15-
// CHECK_IMPLICIT: -fdepscan-prefix-map={{.*}}=/^tc
15+
// CHECK_IMPLICIT: "-fdepscan-prefix-map" "{{.*}}" "/^tc"

clang/test/Driver/fdepscan-prefix-map.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
// RUN: not %clang -fdepscan-prefix-map=/=/^bad -### %s 2>&1 | FileCheck %s -check-prefix=INVALID
55
// INVALID: error: invalid argument '{{.*}}/^bad' to -fdepscan-prefix-map=
66

7-
// RUN: %clang -fdepscan-prefix-map=/good=/^good -### %s 2>&1 | FileCheck %s
8-
// CHECK: "-fdepscan-prefix-map=/good=/^good"
7+
// RUN: %clang -fdepscan-prefix-map=/good=/^good -### %s 2>&1 | FileCheck --check-prefix CHECK_CORRECT %s
8+
// CHECK_CORRECT: "-fdepscan-prefix-map" "/good" "/^good"
9+
10+
// RUN %clang -fdepscan-prefix-map=/a=/^a -fdepscan-prefix-map /b /^b -fdepscan-prefix-map=/c=/^c -fdepscan-prefix-map /d /^d -### %s 2>&1 | FileCheck --check-prefix=CHECK_MIXED %s
11+
// CHECK_MIXED: "-fdepscan-prefix-map" "/a" "/^a" "-fdepscan-prefix-map" "/b" "/^b" "-fdepscan-prefix-map" "/c" "/^c" "-fdepscan-prefix-map" "/d" "/^d"

0 commit comments

Comments
 (0)