diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-04-19 03:48:30 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-04-19 03:48:30 +0000 |
| commit | f4ff7ca63fe65f490a62ac7a0a9d92bca33bb4de (patch) | |
| tree | a8df418dd7d7cfc2299a3424ca6c35e6ef04d7b0 /lib/Serialization/ASTWriterDecl.cpp | |
| parent | 0d60af37712b2a5f81565b43545c19dea1dab93f (diff) | |
| download | clang-f4ff7ca63fe65f490a62ac7a0a9d92bca33bb4de.tar.gz clang-f4ff7ca63fe65f490a62ac7a0a9d92bca33bb4de.tar.bz2 clang-f4ff7ca63fe65f490a62ac7a0a9d92bca33bb4de.tar.xz | |
When a module completes the definition of a class template specialization imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterDecl.cpp')
| -rw-r--r-- | lib/Serialization/ASTWriterDecl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp index 14304ab6e1..6841a9224a 100644 --- a/lib/Serialization/ASTWriterDecl.cpp +++ b/lib/Serialization/ASTWriterDecl.cpp @@ -984,9 +984,6 @@ void ASTDeclWriter::VisitUnresolvedUsingTypenameDecl( void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { VisitRecordDecl(D); - Record.push_back(D->isThisDeclarationADefinition()); - if (D->isThisDeclarationADefinition()) - Writer.AddCXXDefinitionData(D, Record); enum { CXXRecNotTemplate = 0, CXXRecTemplate, CXXRecMemberSpecialization @@ -1004,6 +1001,10 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { Record.push_back(CXXRecNotTemplate); } + Record.push_back(D->isThisDeclarationADefinition()); + if (D->isThisDeclarationADefinition()) + Writer.AddCXXDefinitionData(D, Record); + // Store (what we currently believe to be) the key function to avoid // deserializing every method so we can compute it. if (D->IsCompleteDefinition) |
