When implicit members are added to a C++ record, notify the serializer so that a chained PCH writes the definition again.

Thanks to Doug for the hint!

llvm-svn: 116975
This commit is contained in:
Argyrios Kyrtzidis 2010-10-20 23:48:42 +00:00
parent 54b88e72d0
commit 00f5266dbf
1 changed files with 7 additions and 0 deletions

View File

@ -363,6 +363,13 @@ void CXXRecordDecl::addedMember(Decl *D) {
} }
if (D->isImplicit()) { if (D->isImplicit()) {
// Notify the serializer that an implicit member changed the definition.
// A chained PCH will write the whole definition again.
// FIXME: Make a notification about the specific change (through a listener
// interface) so the changes that the serializer records are more
// fine grained.
data().Definition->setChangedSinceDeserialization(true);
if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(D)) { if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
// If this is the implicit default constructor, note that we have now // If this is the implicit default constructor, note that we have now
// declared it. // declared it.