brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 36c9c2b Raw
32 lines · plain
1 2#ifndef PCH_HEADER3#define PCH_HEADER4 5#include <DependsOnModule/DependsOnModule.h>6extern int pch_glob;7 8#else9 10int glob;11 12#endif13 14// RUN: rm -rf %t.cache15// RUN: c-index-test -write-pch %t.h.pch %s -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs -Xclang -fdisable-module-hash16// RUN: c-index-test -index-file %s -include %t.h -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs \17// RUN:      -Xclang -fdisable-module-hash | FileCheck %s18 19// CHECK-NOT: [indexDeclaration]20// CHECK:      [importedASTFile]: {{.*}}.h.pch21// CHECK-NEXT: [startedTranslationUnit]22// CHECK-NEXT: [enteredMainFile]: {{.*[/\\]}}index-pch-with-module.m23// CHECK-NEXT: [indexDeclaration]: kind: variable | name: glob | {{.*}} | loc: 10:524// CHECK-NOT: [indexDeclaration]25 26// RUN: c-index-test -index-tu %t.h.pch | FileCheck %s -check-prefix=CHECK-PCH27 28// CHECK-PCH: [enteredMainFile]: {{.*[/\\]}}index-pch-with-module.m29// CHECK-PCH: [startedTranslationUnit]30// CHECK-PCH: [importedASTFile]: {{.*}}.cache{{[/\\]}}DependsOnModule.pcm | loc: 5:1 | name: "DependsOnModule" | isImplicit: 131// CHECK-PCH: [indexDeclaration]: kind: variable | name: pch_glob | {{.*}} | loc: 6:1232