Argyrios Kyrtzidis | 8003fd6 | 2012-10-11 19:00:44 +0000 | [diff] [blame] | 1 | |
| 2 | #ifndef PCH_HEADER |
| 3 | #define PCH_HEADER |
| 4 | |
| 5 | #include <DependsOnModule/DependsOnModule.h> |
| 6 | extern int pch_glob; |
| 7 | |
| 8 | #else |
| 9 | |
| 10 | int glob; |
| 11 | |
| 12 | #endif |
| 13 | |
| 14 | // RUN: rm -rf %t.cache |
| 15 | // RUN: c-index-test -write-pch %t.h.pch %s -fmodule-cache-path %t.cache -fmodules -F %S/../Modules/Inputs -Xclang -fdisable-module-hash |
| 16 | // RUN: c-index-test -index-file %s -include %t.h -fmodule-cache-path %t.cache -fmodules -F %S/../Modules/Inputs \ |
| 17 | // RUN: -Xclang -fdisable-module-hash | FileCheck %s |
| 18 | |
| 19 | // CHECK-NOT: [indexDeclaration] |
| 20 | // CHECK: [importedASTFile]: {{.*}}.h.pch |
NAKAMURA Takumi | 55cbb79 | 2012-10-11 22:33:14 +0000 | [diff] [blame] | 21 | // CHECK-NEXT: [enteredMainFile]: {{.*[/\\]}}index-pch-with-module.m |
Argyrios Kyrtzidis | 8003fd6 | 2012-10-11 19:00:44 +0000 | [diff] [blame] | 22 | // CHECK-NEXT: [startedTranslationUnit] |
| 23 | // 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 Takumi | 55cbb79 | 2012-10-11 22:33:14 +0000 | [diff] [blame] | 28 | // CHECK-PCH: [enteredMainFile]: {{.*[/\\]}}index-pch-with-module.m |
Argyrios Kyrtzidis | 8003fd6 | 2012-10-11 19:00:44 +0000 | [diff] [blame] | 29 | // CHECK-PCH: [startedTranslationUnit] |
NAKAMURA Takumi | 55cbb79 | 2012-10-11 22:33:14 +0000 | [diff] [blame] | 30 | // CHECK-PCH: [importedASTFile]: {{.*}}.cache{{[/\\]}}DependsOnModule.pcm | loc: 5:2 | name: "DependsOnModule" | isImplicit: 1 |
Argyrios Kyrtzidis | 8003fd6 | 2012-10-11 19:00:44 +0000 | [diff] [blame] | 31 | // CHECK-PCH: [indexDeclaration]: kind: variable | name: pch_glob | {{.*}} | loc: 6:12 |