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
diff --git a/AST/DeclSerialization.cpp b/AST/DeclSerialization.cpp
index f2ed75b..cc29210 100644
--- a/AST/DeclSerialization.cpp
+++ b/AST/DeclSerialization.cpp
@@ -146,15 +146,11 @@
 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 @@
 //      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;
 }