2012-10-12 03:00:44 +08:00
|
|
|
|
|
|
|
#ifndef PCH_HEADER
|
|
|
|
#define PCH_HEADER
|
|
|
|
|
|
|
|
#include <DependsOnModule/DependsOnModule.h>
|
|
|
|
extern int pch_glob;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
int glob;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// RUN: rm -rf %t.cache
|
2013-02-08 03:01:24 +08:00
|
|
|
// RUN: c-index-test -write-pch %t.h.pch %s -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs -Xclang -fdisable-module-hash
|
|
|
|
// RUN: c-index-test -index-file %s -include %t.h -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs \
|
2012-10-12 03:00:44 +08:00
|
|
|
// RUN: -Xclang -fdisable-module-hash | FileCheck %s
|
|
|
|
|
|
|
|
// CHECK-NOT: [indexDeclaration]
|
|
|
|
// CHECK: [importedASTFile]: {{.*}}.h.pch
|
|
|
|
// CHECK-NEXT: [startedTranslationUnit]
|
2015-08-19 04:39:29 +08:00
|
|
|
// CHECK-NEXT: [enteredMainFile]: {{.*[/\\]}}index-pch-with-module.m
|
2012-10-12 03:00:44 +08:00
|
|
|
// CHECK-NEXT: [indexDeclaration]: kind: variable | name: glob | {{.*}} | loc: 10:5
|
|
|
|
// CHECK-NOT: [indexDeclaration]
|
|
|
|
|
|
|
|
// RUN: c-index-test -index-tu %t.h.pch | FileCheck %s -check-prefix=CHECK-PCH
|
|
|
|
|
2012-10-12 06:33:14 +08:00
|
|
|
// CHECK-PCH: [enteredMainFile]: {{.*[/\\]}}index-pch-with-module.m
|
2012-10-12 03:00:44 +08:00
|
|
|
// CHECK-PCH: [startedTranslationUnit]
|
2015-05-18 13:35:52 +08:00
|
|
|
// CHECK-PCH: [importedASTFile]: {{.*}}.cache{{[/\\]}}DependsOnModule.pcm | loc: 5:1 | name: "DependsOnModule" | isImplicit: 1
|
2012-10-12 03:00:44 +08:00
|
|
|
// CHECK-PCH: [indexDeclaration]: kind: variable | name: pch_glob | {{.*}} | loc: 6:12
|