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 | cd45dbc5f24c2f764c9c3435b7b31e74d6faac15 (patch) | |
tree | 79b2fcb05255ccfc49630aae44b8700c3ce59f27 /clang/lib/Serialization/ASTWriterDecl.cpp | |
parent | af90cf528c32265ecc6888714a28ef3e97342802 (diff) | |
download | bcm5719-llvm-cd45dbc5f24c2f764c9c3435b7b31e74d6faac15.tar.gz bcm5719-llvm-cd45dbc5f24c2f764c9c3435b7b31e74d6faac15.zip |
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.
llvm-svn: 206680
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterDecl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 14304ab6e1a..6841a9224a9 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/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) |