diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-03 21:05:51 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-03 21:05:51 +0000 |
commit | f484b139dbc7a0e303657da51585d29ca2c9a007 (patch) | |
tree | 5471e9351faa52d12ebbb9f7bf8df09b2660bf92 /clang/tools/libclang/IndexingContext.cpp | |
parent | 184b14428e6580c97cf60b94777fa0db4727ab63 (diff) | |
download | bcm5719-llvm-f484b139dbc7a0e303657da51585d29ca2c9a007.tar.gz bcm5719-llvm-f484b139dbc7a0e303657da51585d29ca2c9a007.zip |
[libclang] When indexing, invoke the importedASTFile for PCH files as well.
llvm-svn: 165161
Diffstat (limited to 'clang/tools/libclang/IndexingContext.cpp')
-rw-r--r-- | clang/tools/libclang/IndexingContext.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp index c964e963c73..1186191cc37 100644 --- a/clang/tools/libclang/IndexingContext.cpp +++ b/clang/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) |