diff options
Diffstat (limited to 'tools/libclang/IndexingContext.cpp')
-rw-r--r-- | tools/libclang/IndexingContext.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp index 210dc36d52..3a3c010370 100644 --- a/tools/libclang/IndexingContext.cpp +++ b/tools/libclang/IndexingContext.cpp @@ -253,6 +253,27 @@ void IndexingContext::ppIncludedFile(SourceLocation hashLoc, FileMap[File] = idxFile; } +void IndexingContext::importedModule(SourceLocation Loc, + StringRef name, bool isIncludeDirective, + const Module *module) { + if (!CB.importedASTFile) + return; + + std::string ModuleName = module->getFullModuleName(); + + ScratchAlloc SA(*this); + CXIdxImportedASTFileInfo Info = { + (CXFile)module->getASTFile(), + getIndexLoc(Loc), + /*isModule=*/true, + isIncludeDirective, + SA.toCStr(name), + ModuleName.c_str(), + }; + CXIdxClientASTFile astFile = CB.importedASTFile(ClientData, &Info); + (void)astFile; +} + void IndexingContext::startedTranslationUnit() { CXIdxClientContainer idxCont = 0; if (CB.startedTranslationUnit) |