summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-02 21:09:13 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-02 21:09:13 +0000
commit10e7846abf4e69f03dfb65b36d866c01ece66645 (patch)
treec237a52fbbd973c3eea4cb769bc38695e7bc23ac /clang/lib/Serialization/ASTWriter.cpp
parent7768299b98ba4f5b8a4e3f627b521bb8f0e40173 (diff)
downloadbcm5719-llvm-10e7846abf4e69f03dfb65b36d866c01ece66645.tar.gz
bcm5719-llvm-10e7846abf4e69f03dfb65b36d866c01ece66645.zip
[libclang] When indexing an AST file, only deserialize the file level
declarations of the current primary module. llvm-svn: 165046
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 7aa68b7bc68..384995722af 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -2251,9 +2251,11 @@ void ASTWriter::WriteFileDeclIDsMap() {
BitCodeAbbrev *Abbrev = new BitCodeAbbrev();
Abbrev->Add(BitCodeAbbrevOp(FILE_SORTED_DECLS));
+ Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32));
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
unsigned AbbrevCode = Stream.EmitAbbrev(Abbrev);
Record.push_back(FILE_SORTED_DECLS);
+ Record.push_back(FileSortedIDs.size());
Stream.EmitRecordWithBlob(AbbrevCode, Record, data(FileSortedIDs));
}
OpenPOWER on IntegriCloud