diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-02 16:10:38 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-02 16:10:38 +0000 |
commit | 472eda06b00f4963dcdeb3e4417d2f2176e85c21 (patch) | |
tree | b5b1939f7d983f9db117ecc65f4accac1ca35b20 /clang/tools/libclang/Indexing.cpp | |
parent | bc2724f6e044f486ba167a2a3fa32aff4d9def4e (diff) | |
download | bcm5719-llvm-472eda06b00f4963dcdeb3e4417d2f2176e85c21.tar.gz bcm5719-llvm-472eda06b00f4963dcdeb3e4417d2f2176e85c21.zip |
[libclang] Implement the importedASTFile indexing callback to provide
info about imported modules.
llvm-svn: 165020
Diffstat (limited to 'clang/tools/libclang/Indexing.cpp')
-rw-r--r-- | clang/tools/libclang/Indexing.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index c4fba968492..efae7eecd83 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/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); |