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