diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-02 16:10:46 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-02 16:10:46 +0000 |
commit | f590e094addee7edb7c9605bd8c1f02ff72fda0c (patch) | |
tree | 19948b1cc3bb72938f4f42061725f350ff7f4858 /clang/tools/libclang/Indexing.cpp | |
parent | b36ee5c59284a6f0b85a42c084f2019c431bb340 (diff) | |
download | bcm5719-llvm-f590e094addee7edb7c9605bd8c1f02ff72fda0c.tar.gz bcm5719-llvm-f590e094addee7edb7c9605bd8c1f02ff72fda0c.zip |
Add info in the preprocessing record whether an inclusion directive
resulted in an automatic module import.
llvm-svn: 165022
Diffstat (limited to 'clang/tools/libclang/Indexing.cpp')
-rw-r--r-- | clang/tools/libclang/Indexing.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index 963e0026438..f6314b90ec9 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/tools/libclang/Indexing.cpp @@ -475,7 +475,8 @@ static void indexPreprocessingRecord(ASTUnit &Unit, IndexingContext &IdxCtx) { PreprocessedEntity *PPE = *I; if (InclusionDirective *ID = dyn_cast<InclusionDirective>(PPE)) { - IdxCtx.ppIncludedFile(ID->getSourceRange().getBegin(), ID->getFileName(), + if (!ID->importedModule()) + IdxCtx.ppIncludedFile(ID->getSourceRange().getBegin(),ID->getFileName(), ID->getFile(), ID->getKind() == InclusionDirective::Import, !ID->wasInQuotes()); } |