1@import ModuleNeedsVFS;
2
3void foo() {
4  module_needs_vfs();
5  base_module_needs_vfs();
6}
7
8// RUN: rm -rf %t.cache
9// RUN: sed -e "s@INPUT_DIR@%{/S:regex_replacement}/Inputs@g" -e "s@OUT_DIR@%{/t:regex_replacement}@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
10// RUN: c-index-test -index-file %s -fmodules-cache-path=%t.cache -fmodules -F %t -I %t \
11// RUN:              -ivfsoverlay %t.yaml -Xclang -fdisable-module-hash | FileCheck %s
12
13// CHECK: [importedASTFile]: {{.*}}ModuleNeedsVFS.pcm | loc: 1:1 | name: "ModuleNeedsVFS" | isImplicit: 0
14// CHECK: [indexEntityReference]: kind: function | name: module_needs_vfs
15// CHECK: [indexEntityReference]: kind: function | name: base_module_needs_vfs
16
17// RUN: c-index-test -index-tu %t.cache/ModuleNeedsVFS.pcm | FileCheck %s -check-prefix=CHECK-MOD
18
19// CHECK-MOD: [ppIncludedFile]: {{.*}}module_needs_vfs.h
20// CHECK-MOD: [importedASTFile]: {{.*}}BaseModuleNeedsVFS.pcm
21// CHECK-MOD: [indexEntityReference]: kind: function | name: base_module_needs_vfs
22
23// RUN: c-index-test -index-tu %t.cache/BaseModuleNeedsVFS.pcm | FileCheck %s -check-prefix=CHECK-MOD2
24
25// CHECK-MOD2: [ppIncludedFile]: {{.*}}base_module_needs_vfs.h
26