|
7 | 7 | // RUN: clang-scan-deps -compilation-database %t/build/compile-commands.json \ |
8 | 8 | // RUN: -j 1 -format experimental-full -optimize-args=canonicalize-macros > %t/deps.db |
9 | 9 | // RUN: cat %t/deps.db | FileCheck %s -DPREFIX=%/t |
| 10 | +// RUN: clang-scan-deps -compilation-database %t/build/compile-commands.json \ |
| 11 | +// RUN: -j 1 -format experimental-include-tree-full -cas-path %t/cas \ |
| 12 | +// RUN: -optimize-args=canonicalize-macros > %t/deps_cas.db |
| 13 | +// RUN: cat %t/deps_cas.db | FileCheck %s --check-prefixes=CAS |
10 | 14 |
|
11 | 15 | // This tests that we have two scanning module variants. |
12 | 16 | // RUN: find %t/module-cache -name "*.pcm" | wc -l | grep 2 |
|
51 | 55 | // CHECK: } |
52 | 56 |
|
53 | 57 |
|
| 58 | +// Check that when CAS is on, we still only have two variants of A. |
| 59 | +// CAS: { |
| 60 | +// CAS-NEXT: "modules": [ |
| 61 | +// CAS-NEXT: { |
| 62 | +// CAS-NEXT: "cache-key": "{{.*}}", |
| 63 | +// CAS-NEXT: "cas-include-tree-id": "{{.*}}", |
| 64 | +// CAS-NEXT: "clang-module-deps": [], |
| 65 | +// CAS-NEXT: "clang-modulemap-file": |
| 66 | +// CAS-NEXT: "command-line": [ |
| 67 | +// CAS: ], |
| 68 | +// CAS-NEXT: "context-hash": "{{.*}}", |
| 69 | +// CAS-NEXT: "file-deps": [ |
| 70 | +// CAS: ], |
| 71 | +// CAS-NEXT: "link-libraries": [], |
| 72 | +// CAS-NEXT: "name": "A" |
| 73 | +// CAS-NEXT: }, |
| 74 | +// CAS-NEXT: { |
| 75 | +// CAS-NEXT: "cache-key": "{{.*}}", |
| 76 | +// CAS-NEXT: "cas-include-tree-id": "{{.*}}", |
| 77 | +// CAS-NEXT: "clang-module-deps": [], |
| 78 | +// CAS-NEXT: "clang-modulemap-file": |
| 79 | +// CAS-NEXT: "command-line": [ |
| 80 | +// CAS: ], |
| 81 | +// CAS-NEXT: "context-hash": "{{.*}}", |
| 82 | +// CAS-NEXT: "file-deps": [ |
| 83 | +// CAS: ], |
| 84 | +// CAS-NEXT: "link-libraries": [], |
| 85 | +// CAS-NEXT: "name": "A" |
| 86 | +// CAS-NEXT: } |
| 87 | +// CAS-NEXT: ], |
| 88 | +// CAS-NEXT: "translation-units": [ |
| 89 | +// CAS: ] |
| 90 | +// CAS: } |
| 91 | + |
| 92 | + |
54 | 93 | //--- build/compile-commands.json.in |
55 | 94 |
|
56 | 95 | [ |
|
0 commit comments