]> granicus.if.org Git - clang/commitdiff
When serializing FunctionDecl, serialize out a reference to the previous declaration.
authorTed Kremenek <kremenek@apple.com>
Tue, 20 May 2008 03:33:58 +0000 (03:33 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 20 May 2008 03:33:58 +0000 (03:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51294 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclSerialization.cpp

index d2dde67cb2f499a3ea493515991dccc05196f6ed..bbc28ab6d78c65304e0b06822ab520a73b205039 100644 (file)
@@ -362,6 +362,7 @@ void FunctionDecl::EmitImpl(Serializer& S) const {
   S.EmitBool(IsInline);        // From FunctionDecl.
   ValueDecl::EmitInRec(S);
   S.EmitPtr(DeclChain);
+  S.EmitPtr(PreviousDeclaration);
   
   // NOTE: We do not need to serialize out the number of parameters, because
   //  that is encoded in the type (accessed via getNumParams()).
@@ -387,6 +388,7 @@ FunctionDecl* FunctionDecl::CreateImpl(Deserializer& D, ASTContext& C) {
   
   decl->ValueDecl::ReadInRec(D, C);
   D.ReadPtr(decl->DeclChain);
+  D.ReadPtr(decl->PreviousDeclaration);
 
   Decl* next_declarator;