diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-12-13 06:28:13 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-12-13 06:28:13 +0000 |
commit | 137bd91e8ef5fb407dce910704101bf730b13696 (patch) | |
tree | c81958882a0ffad8f47ccbd2f073dc4efcd96867 /AST/DeclSerialization.cpp | |
parent | 623ec629c8f187c8dccf4419215d06b432994425 (diff) |
Updated serialization of ParmVarDecl to serialize out objcDeclQualifier.
Previously this field was serialized out in VarDecl (a parent class), but
now the field belongs to ParmVarDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'AST/DeclSerialization.cpp')
-rw-r--r-- | AST/DeclSerialization.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/AST/DeclSerialization.cpp b/AST/DeclSerialization.cpp index f2ed75b4b5..cc29210f4f 100644 --- a/AST/DeclSerialization.cpp +++ b/AST/DeclSerialization.cpp @@ -146,15 +146,11 @@ void ValueDecl::ReadInRec(Deserializer& D) { void VarDecl::EmitInRec(Serializer& S) const { ValueDecl::EmitInRec(S); S.EmitInt(getStorageClass()); // From VarDecl. - // FIXME: This is now in ParmVarDecl - // S.EmitInt(getObjcDeclQualifier()); // From VarDecl. } void VarDecl::ReadInRec(Deserializer& D) { ValueDecl::ReadInRec(D); SClass = static_cast<StorageClass>(D.ReadInt()); // From VarDecl. - // FIXME: This is now in ParmVarDecl - // objcDeclQualifier = static_cast<ObjcDeclQualifier>(D.ReadInt()); // VarDecl. } //===------------------------------------------------------------===// @@ -219,12 +215,18 @@ FileVarDecl* FileVarDecl::CreateImpl(Deserializer& D) { // ParmDecl Serialization. //===----------------------------------------------------------------------===// +void ParmVarDecl::EmitImpl(llvm::Serializer& S) const { + VarDecl::EmitImpl(S); + S.EmitInt(getObjcDeclQualifier()); // From ParmVarDecl. +} + ParmVarDecl* ParmVarDecl::CreateImpl(Deserializer& D) { ParmVarDecl* decl = new ParmVarDecl(SourceLocation(),NULL,QualType(),None,NULL); decl->VarDecl::ReadImpl(D); - + decl->objcDeclQualifier = static_cast<ObjcDeclQualifier>(D.ReadInt()); + return decl; } |