[cfe-commits] r44989 - in /cfe/trunk: AST/DeclSerialization.cpp include/clang/AST/Decl.h
Ted Kremenek
kremenek at apple.com
Wed Dec 12 22:28:14 PST 2007
Author: kremenek
Date: Thu Dec 13 00:28:13 2007
New Revision: 44989
URL: http://llvm.org/viewvc/llvm-project?rev=44989&view=rev
Log:
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.
Modified:
cfe/trunk/AST/DeclSerialization.cpp
cfe/trunk/include/clang/AST/Decl.h
Modified: cfe/trunk/AST/DeclSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/DeclSerialization.cpp?rev=44989&r1=44988&r2=44989&view=diff
==============================================================================
--- cfe/trunk/AST/DeclSerialization.cpp (original)
+++ cfe/trunk/AST/DeclSerialization.cpp Thu Dec 13 00:28:13 2007
@@ -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;
}
Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=44989&r1=44988&r2=44989&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Thu Dec 13 00:28:13 2007
@@ -410,6 +410,9 @@
ObjcDeclQualifier objcDeclQualifier : 6;
protected:
+ /// EmitImpl - Serialize this ParmVarDecl. Called by Decl::Emit.
+ virtual void EmitImpl(llvm::Serializer& S) const;
+
/// CreateImpl - Deserialize a ParmVarDecl. Called by Decl::Create.
static ParmVarDecl* CreateImpl(llvm::Deserializer& D);
More information about the cfe-commits
mailing list