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 | 00f5266dbfa4b9f57cb8ba7f6138f167e73074c4 (patch) | |
tree | 0df13880c8f297d701ea29057b793d769031f754 /clang/lib | |
parent | 54b88e72d012b2eaf8f0153693e94db3e58e15e1 (diff) | |
download | bcm5719-llvm-00f5266dbfa4b9f57cb8ba7f6138f167e73074c4.tar.gz bcm5719-llvm-00f5266dbfa4b9f57cb8ba7f6138f167e73074c4.zip |
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
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 19caae5b7f2..78b15ffed9d 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/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. |