aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/Indexing.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-02 16:10:38 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-02 16:10:38 +0000
commit2c3e05c266de0d4c465b58ffd129bd0b31604368 (patch)
tree208f2ff0a3e8f8bdf812c4774e5e4512b90005c6 /tools/libclang/Indexing.cpp
parentd44e43e46f81cc83b8f1e4384724a9923426bb2a (diff)
[libclang] Implement the importedASTFile indexing callback to provide
info about imported modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/Indexing.cpp')
-rw-r--r--tools/libclang/Indexing.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp
index c4fba96849..efae7eecd8 100644
--- a/tools/libclang/Indexing.cpp
+++ b/tools/libclang/Indexing.cpp
@@ -73,6 +73,12 @@ public:
StringRef SearchPath,
StringRef RelativePath,
const Module *Imported) {
+ if (Imported) {
+ IndexCtx.importedModule(HashLoc, FileName, /*isIncludeDirective=*/true,
+ Imported);
+ return;
+ }
+
bool isImport = (IncludeTok.is(tok::identifier) &&
IncludeTok.getIdentifierInfo()->getPPKeywordID() == tok::pp_import);
IndexCtx.ppIncludedFile(HashLoc, FileName, File, isImport, IsAngled);