diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-02 16:10:51 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-02 16:10:51 +0000 |
commit | d4fcf580709443c73c4b15d9880eb0851dbb6ff1 (patch) | |
tree | 359b775e05bd465fbf48568acc20408152e0eaa5 /clang/tools/libclang/Indexing.cpp | |
parent | f590e094addee7edb7c9605bd8c1f02ff72fda0c (diff) | |
download | bcm5719-llvm-d4fcf580709443c73c4b15d9880eb0851dbb6ff1.tar.gz bcm5719-llvm-d4fcf580709443c73c4b15d9880eb0851dbb6ff1.zip |
[libclang] When indexing an AST file, only deserialize the preprocessing record
entities of the current primary module.
llvm-svn: 165023
Diffstat (limited to 'clang/tools/libclang/Indexing.cpp')
-rw-r--r-- | clang/tools/libclang/Indexing.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index f6314b90ec9..8c19aeba285 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/tools/libclang/Indexing.cpp @@ -455,21 +455,10 @@ static void indexPreprocessingRecord(ASTUnit &Unit, IndexingContext &IdxCtx) { if (!PP.getPreprocessingRecord()) return; - PreprocessingRecord &PPRec = *PP.getPreprocessingRecord(); - // FIXME: Only deserialize inclusion directives. - // FIXME: Only deserialize stuff from the last chained PCH, not the PCH/Module - // that it depends on. - bool OnlyLocal = !Unit.isMainFileAST() && Unit.getOnlyLocalDecls(); PreprocessingRecord::iterator I, E; - if (OnlyLocal) { - I = PPRec.local_begin(); - E = PPRec.local_end(); - } else { - I = PPRec.begin(); - E = PPRec.end(); - } + llvm::tie(I, E) = Unit.getLocalPreprocessingEntities(); for (; I != E; ++I) { PreprocessedEntity *PPE = *I; |