summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/Indexing.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-02 16:10:46 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-02 16:10:46 +0000
commitf590e094addee7edb7c9605bd8c1f02ff72fda0c (patch)
tree19948b1cc3bb72938f4f42061725f350ff7f4858 /clang/tools/libclang/Indexing.cpp
parentb36ee5c59284a6f0b85a42c084f2019c431bb340 (diff)
downloadbcm5719-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.cpp3
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());
}
OpenPOWER on IntegriCloud