blob: 36c9c2beb475b94d705ec6489919a48d75ce13e0 [file] [log] [blame]
Argyrios Kyrtzidis9f571862012-10-11 19:00:44 +00001
2#ifndef PCH_HEADER
3#define PCH_HEADER
4
5#include <DependsOnModule/DependsOnModule.h>
6extern int pch_glob;
7
8#else
9
10int glob;
11
12#endif
13
14// RUN: rm -rf %t.cache
Douglas Gregor35b04d62013-02-07 19:01:24 +000015// RUN: c-index-test -write-pch %t.h.pch %s -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs -Xclang -fdisable-module-hash
16// RUN: c-index-test -index-file %s -include %t.h -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs \
Argyrios Kyrtzidis9f571862012-10-11 19:00:44 +000017// RUN: -Xclang -fdisable-module-hash | FileCheck %s
18
19// CHECK-NOT: [indexDeclaration]
20// CHECK: [importedASTFile]: {{.*}}.h.pch
Argyrios Kyrtzidis9f571862012-10-11 19:00:44 +000021// CHECK-NEXT: [startedTranslationUnit]
Richard Smith293534b2015-08-18 20:39:29 +000022// CHECK-NEXT: [enteredMainFile]: {{.*[/\\]}}index-pch-with-module.m
Argyrios Kyrtzidis9f571862012-10-11 19:00:44 +000023// CHECK-NEXT: [indexDeclaration]: kind: variable | name: glob | {{.*}} | loc: 10:5
24// CHECK-NOT: [indexDeclaration]
25
26// RUN: c-index-test -index-tu %t.h.pch | FileCheck %s -check-prefix=CHECK-PCH
27
NAKAMURA Takumi9bec0792012-10-11 22:33:14 +000028// CHECK-PCH: [enteredMainFile]: {{.*[/\\]}}index-pch-with-module.m
Argyrios Kyrtzidis9f571862012-10-11 19:00:44 +000029// CHECK-PCH: [startedTranslationUnit]
Richard Smithbca31b72015-05-18 05:35:52 +000030// CHECK-PCH: [importedASTFile]: {{.*}}.cache{{[/\\]}}DependsOnModule.pcm | loc: 5:1 | name: "DependsOnModule" | isImplicit: 1
Argyrios Kyrtzidis9f571862012-10-11 19:00:44 +000031// CHECK-PCH: [indexDeclaration]: kind: variable | name: pch_glob | {{.*}} | loc: 6:12