1
- // RUN: rm -rf %t.mcp %t
1
+ // RUN: rm -rf %t
2
2
3
3
// RUN: c-index-test core --scan-deps %S -output-dir=%t -cas-path %t/cas \
4
4
// RUN: -- %clang -c -I %S/Inputs/module \
5
- // RUN: -fmodules -fmodules-cache-path=%t.mcp \
5
+ // RUN: -fmodules -fmodules-cache-path=%t/mcpit \
6
6
// RUN: -o FoE.o -x objective-c %s > %t.result
7
- // RUN: cat %t.result | sed 's/\\/\//g' | FileCheck %s -DPREFIX=%S -DOUTPUTS=%/t
7
+ // RUN: cat %t.result | sed 's/\\/\//g' | FileCheck %s -DPREFIX=%S -DOUTPUTS=%/t -check-prefix=INCLUDE_TREE
8
8
9
9
// RUN: env CLANG_CACHE_USE_CASFS_DEPSCAN=1 c-index-test core --scan-deps %S -output-dir=%t -cas-path %t/cas \
10
10
// RUN: -- %clang -c -I %S/Inputs/module \
11
- // RUN: -fmodules -fmodules-cache-path=%t. mcp \
11
+ // RUN: -fmodules -fmodules-cache-path=%t/ mcp \
12
12
// RUN: -o FoE.o -x objective-c %s > %t.casfs.result
13
13
// RUN: cat %t.casfs.result | sed 's/\\/\//g' | FileCheck %s -DPREFIX=%S -DOUTPUTS=%/t
14
14
15
- // FIXME: enable modules when supported.
16
15
// RUN: env CLANG_CACHE_USE_INCLUDE_TREE=1 c-index-test core --scan-deps %S -output-dir=%t -cas-path %t/cas \
17
16
// RUN: -- %clang -c -I %S/Inputs/module \
17
+ // RUN: -fmodules -fmodules-cache-path=%t/mcpit \
18
18
// RUN: -o FoE.o -x objective-c %s > %t.includetree.result
19
19
// RUN: cat %t.includetree.result | sed 's/\\/\//g' | FileCheck %s -DPREFIX=%S -DOUTPUTS=%/t -check-prefix=INCLUDE_TREE
20
20
21
21
// RUN: c-index-test core --scan-deps %S -output-dir=%t \
22
22
// RUN: -- %clang -c -I %S/Inputs/module \
23
- // RUN: -fmodules -fmodules-cache-path=%t. mcp \
23
+ // RUN: -fmodules -fmodules-cache-path=%t/ mcp \
24
24
// RUN: -o FoE.o -x objective-c %s | FileCheck %s -check-prefix=NO_CAS
25
25
// NO_CAS-NOT: fcas
26
26
// NO_CAS-NOT: faction-cache
65
65
// CHECK-SAME: -fmodule-file-cache-key [[PCM:.*ModA_.*pcm]] llvmcas://{{[[:xdigit:]]+}}
66
66
// CHECK-SAME: -fmodule-file={{(ModA=)?}}[[PCM]]
67
67
68
+
69
+ // INCLUDE_TREE: modules:
70
+ // INCLUDE_TREE-NEXT: module:
71
+ // INCLUDE_TREE-NEXT: name: ModA
72
+ // INCLUDE_TREE-NEXT: context-hash: [[HASH_MOD_A:[A-Z0-9]+]]
73
+ // INCLUDE_TREE-NEXT: module-map-path: /Users/blangmuir/src/cas/llvm-project/clang/test/Index/Core/Inputs/module/module.modulemap
74
+ // INCLUDE_TREE-NEXT: cache-key: [[ModA_CACHE_KEY:llvmcas://[[:xdigit:]]+]]
75
+ // INCLUDE_TREE-NEXT: module-deps:
76
+ // INCLUDE_TREE-NEXT: file-deps:
77
+ // INCLUDE_TREE-NEXT: [[PREFIX]]/Inputs/module/ModA.h
78
+ // INCLUDE_TREE-NEXT: [[PREFIX]]/Inputs/module/SubModA.h
79
+ // INCLUDE_TREE-NEXT: [[PREFIX]]/Inputs/module/SubSubModA.h
80
+ // INCLUDE_TREE-NEXT: [[PREFIX]]/Inputs/module/module.modulemap
81
+ // INCLUDE_TREE-NEXT: build-args:
82
+ // INCLUDE_TREE-SAME: -cc1
83
+ // INCLUDE_TREE-SAME: -fcas-path
84
+ // INCLUDE_TREE-SAME: -fcas-include-tree llvmcas://{{[[:xdigit:]]+}}
85
+ // INCLUDE_TREE-SAME: -fcache-compile-job
86
+
68
87
// INCLUDE_TREE: dependencies:
69
88
// INCLUDE_TREE-NEXT: command 0:
70
89
// INCLUDE_TREE-NEXT: context-hash: [[HASH_TU:[A-Z0-9]+]]
71
90
// INCLUDE_TREE-NEXT: cache-key: [[INC_TU_CACHE_KEY:llvmcas://[[:xdigit:]]+]]
72
91
// INCLUDE_TREE-NEXT: module-deps:
92
+ // INCLUDE_TREE-NEXT: ModA:[[HASH_MOD_A]]
73
93
// INCLUDE_TREE-NEXT: file-deps:
74
94
// INCLUDE_TREE-NEXT: [[PREFIX]]/scan-deps-cas.m
75
- // INCLUDE_TREE-NEXT: [[PREFIX]]/Inputs/module/ModA.h
76
95
// INCLUDE_TREE-NEXT: build-args:
77
96
// INCLUDE_TREE-SAME: -cc1
78
97
// INCLUDE_TREE-SAME: -fcas-path
79
98
// INCLUDE_TREE-SAME: -fcas-include-tree llvmcas://{{[[:xdigit:]]+}}
80
99
// INCLUDE_TREE-SAME: -fcache-compile-job
100
+ // INCLUDE_TREE-SAME: -fmodule-file-cache-key [[PCM:.*ModA_.*pcm]] [[ModA_CACHE_KEY]]
101
+ // INCLUDE_TREE-SAME: -fmodule-file={{(ModA=)?}}[[PCM]]
0 commit comments