diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-20 23:48:42 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-20 23:48:42 +0000 |
commit | 046c03bc392db4b3f55e326d25565a787dbb9cc4 (patch) | |
tree | 8bb9ad4b6866f7e8a44ec3d10813d1935162dd94 | |
parent | 441fff128f833c46172300e3fa815920b80420f7 (diff) |
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!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116975 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/DeclCXX.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index 19caae5b7f..78b15ffed9 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -363,6 +363,13 @@ void CXXRecordDecl::addedMember(Decl *D) { } 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 this is the implicit default constructor, note that we have now // declared it. |