1- // RUN: rm -rf %t.mcp %t
1+ // RUN: rm -rf %t
22
33// RUN: c-index-test core --scan-deps %S -output-dir=%t -cas-path %t/cas \
44// RUN: -- %clang -c -I %S/Inputs/module \
5- // RUN: -fmodules -fmodules-cache-path=%t.mcp \
5+ // RUN: -fmodules -fmodules-cache-path=%t/mcpit \
66// 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
88
99// RUN: env CLANG_CACHE_USE_CASFS_DEPSCAN=1 c-index-test core --scan-deps %S -output-dir=%t -cas-path %t/cas \
1010// RUN: -- %clang -c -I %S/Inputs/module \
11- // RUN: -fmodules -fmodules-cache-path=%t. mcp \
11+ // RUN: -fmodules -fmodules-cache-path=%t/ mcp \
1212// RUN: -o FoE.o -x objective-c %s > %t.casfs.result
1313// RUN: cat %t.casfs.result | sed 's/\\/\//g' | FileCheck %s -DPREFIX=%S -DOUTPUTS=%/t
1414
15- // FIXME: enable modules when supported.
1615// RUN: env CLANG_CACHE_USE_INCLUDE_TREE=1 c-index-test core --scan-deps %S -output-dir=%t -cas-path %t/cas \
1716// RUN: -- %clang -c -I %S/Inputs/module \
17+ // RUN: -fmodules -fmodules-cache-path=%t/mcpit \
1818// RUN: -o FoE.o -x objective-c %s > %t.includetree.result
1919// RUN: cat %t.includetree.result | sed 's/\\/\//g' | FileCheck %s -DPREFIX=%S -DOUTPUTS=%/t -check-prefix=INCLUDE_TREE
2020
2121// RUN: c-index-test core --scan-deps %S -output-dir=%t \
2222// RUN: -- %clang -c -I %S/Inputs/module \
23- // RUN: -fmodules -fmodules-cache-path=%t. mcp \
23+ // RUN: -fmodules -fmodules-cache-path=%t/ mcp \
2424// RUN: -o FoE.o -x objective-c %s | FileCheck %s -check-prefix=NO_CAS
2525// NO_CAS-NOT: fcas
2626// NO_CAS-NOT: faction-cache
6565// CHECK-SAME: -fmodule-file-cache-key [[PCM:.*ModA_.*pcm]] llvmcas://{{[[:xdigit:]]+}}
6666// CHECK-SAME: -fmodule-file={{(ModA=)?}}[[PCM]]
6767
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+
6887// INCLUDE_TREE: dependencies:
6988// INCLUDE_TREE-NEXT: command 0:
7089// INCLUDE_TREE-NEXT: context-hash: [[HASH_TU:[A-Z0-9]+]]
7190// INCLUDE_TREE-NEXT: cache-key: [[INC_TU_CACHE_KEY:llvmcas://[[:xdigit:]]+]]
7291// INCLUDE_TREE-NEXT: module-deps:
92+ // INCLUDE_TREE-NEXT: ModA:[[HASH_MOD_A]]
7393// INCLUDE_TREE-NEXT: file-deps:
7494// INCLUDE_TREE-NEXT: [[PREFIX]]/scan-deps-cas.m
75- // INCLUDE_TREE-NEXT: [[PREFIX]]/Inputs/module/ModA.h
7695// INCLUDE_TREE-NEXT: build-args:
7796// INCLUDE_TREE-SAME: -cc1
7897// INCLUDE_TREE-SAME: -fcas-path
7998// INCLUDE_TREE-SAME: -fcas-include-tree llvmcas://{{[[:xdigit:]]+}}
8099// 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