diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-18 19:20:11 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-18 19:20:11 +0000 |
commit | 4eb9fc0449ddbd5239ddc3ae6b6e52880f47dcf7 (patch) | |
tree | 8ddda4b4c7866fc96d51ed0492156ce438b7e554 /lib/Serialization/ASTWriter.cpp | |
parent | eea742b0f60ebab8e5d2c233fe3996dbbd9fb892 (diff) |
Read/write declaration attributes from/to PCH properly. Embed them in the declaration block instead of trying to create another block.
The new block was messing with the assumption that after decls block comes the stmts block.
Fixes http://llvm.org/PR8406
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index a251725450..2cbe08190b 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -684,7 +684,6 @@ void ASTWriter::WriteBlockInfoBlock() { RECORD(TYPE_OBJC_INTERFACE); RECORD(TYPE_OBJC_OBJECT); RECORD(TYPE_OBJC_OBJECT_POINTER); - RECORD(DECL_ATTR); RECORD(DECL_TRANSLATION_UNIT); RECORD(DECL_TYPEDEF); RECORD(DECL_ENUM); @@ -2168,8 +2167,8 @@ void ASTWriter::WriteAdditionalTemplateSpecializations() { //===----------------------------------------------------------------------===// /// \brief Write a record containing the given attributes. -void ASTWriter::WriteAttributeRecord(const AttrVec &Attrs) { - RecordData Record; +void ASTWriter::WriteAttributes(const AttrVec &Attrs, RecordData &Record) { + Record.push_back(Attrs.size()); for (AttrVec::const_iterator i = Attrs.begin(), e = Attrs.end(); i != e; ++i){ const Attr * A = *i; Record.push_back(A->getKind()); // FIXME: stable encoding, target attrs @@ -2179,8 +2178,6 @@ void ASTWriter::WriteAttributeRecord(const AttrVec &Attrs) { #include "clang/Serialization/AttrPCHWrite.inc" } - - Stream.EmitRecord(DECL_ATTR, Record); } void ASTWriter::AddString(llvm::StringRef Str, RecordData &Record) { |