From 36d2fd44bfeec417bbd7465218353abb8bf7e95d Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 14 Oct 2010 20:14:38 +0000 Subject: Store in PCH the key function of C++ class to avoid deserializing the complete declaration context in order to compute it. Progress for rdar://7260160. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116508 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Serialization/ASTWriterDecl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Serialization/ASTWriterDecl.cpp') diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp index 3e1ba89a66..9aaaa485b6 100644 --- a/lib/Serialization/ASTWriterDecl.cpp +++ b/lib/Serialization/ASTWriterDecl.cpp @@ -770,6 +770,11 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { Record.push_back(CXXRecNotTemplate); } + // Store the key function to avoid deserializing every method so we can + // compute it. + if (D->IsDefinition) + Writer.AddDeclRef(Context.getKeyFunction(D), Record); + Code = serialization::DECL_CXX_RECORD; } -- cgit v1.2.3