aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/IndexingContext.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-03 21:05:51 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-03 21:05:51 +0000
commit3da76bfbd24b2747ceb72d1918bbbe3123dac841 (patch)
treea33af700688b2d41830a9fea8b34aa4ec17d8834 /tools/libclang/IndexingContext.cpp
parent37f2f52fbc16b0d426d4d86c7e1662e5c6b9e3b8 (diff)
[libclang] When indexing, invoke the importedASTFile for PCH files as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/IndexingContext.cpp')
-rw-r--r--tools/libclang/IndexingContext.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp
index c964e963c7..1186191cc3 100644
--- a/tools/libclang/IndexingContext.cpp
+++ b/tools/libclang/IndexingContext.cpp
@@ -273,6 +273,21 @@ void IndexingContext::importedModule(const ImportDecl *ImportD) {
(void)astFile;
}
+void IndexingContext::importedPCH(const FileEntry *File) {
+ if (!CB.importedASTFile)
+ return;
+
+ CXIdxImportedASTFileInfo Info = {
+ (CXFile)File,
+ getIndexLoc(SourceLocation()),
+ /*isModule=*/false,
+ /*isImplicit=*/false,
+ /*moduleName=*/NULL
+ };
+ CXIdxClientASTFile astFile = CB.importedASTFile(ClientData, &Info);
+ (void)astFile;
+}
+
void IndexingContext::startedTranslationUnit() {
CXIdxClientContainer idxCont = 0;
if (CB.startedTranslationUnit)