summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-18 19:20:11 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-18 19:20:11 +0000
commit9beef8e53d98e4dee5140ac2d41eac2b3200a9b8 (patch)
treeb63d38cc4c0a5a2dbef44fdb07322b45f7595775 /clang/lib/Serialization/ASTWriter.cpp
parent754fb5ffb3aece3b232ef98f199a3c9e9864c648 (diff)
downloadbcm5719-llvm-9beef8e53d98e4dee5140ac2d41eac2b3200a9b8.tar.gz
bcm5719-llvm-9beef8e53d98e4dee5140ac2d41eac2b3200a9b8.zip
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 llvm-svn: 116737
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index a2517254507..2cbe08190b7 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud