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 | 632dcc92f60ab7f806a89c5bca3a0951763a9219 (patch) | |
tree | b51f5037fa3b356766fb54da2d8f6bd135769448 /tools/libclang/Indexing.cpp | |
parent | 8dd927cf03e85b942f323eebb42e06c839887ebb (diff) |
[libclang] When indexing an AST file, only deserialize the preprocessing record
entities of the current primary module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/Indexing.cpp')
-rw-r--r-- | tools/libclang/Indexing.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp index f6314b90ec..8c19aeba28 100644 --- a/tools/libclang/Indexing.cpp +++ b/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; |