diff options
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 42e5b35f6d7..72b2bf6d168 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -4702,6 +4702,11 @@ void ASTWriter::WriteDeclUpdatesBlocks(RecordDataImpl &OffsetsRecord) { cast<ParmVarDecl>(Update.getDecl())->getDefaultArg())); break; + case UPD_CXX_INSTANTIATED_DEFAULT_MEMBER_INITIALIZER: + Record.AddStmt( + cast<FieldDecl>(Update.getDecl())->getInClassInitializer()); + break; + case UPD_CXX_INSTANTIATED_CLASS_DEFINITION: { auto *RD = cast<CXXRecordDecl>(D); UpdatedDeclContexts.insert(RD->getPrimaryContext()); @@ -5815,6 +5820,15 @@ void ASTWriter::DefaultArgumentInstantiated(const ParmVarDecl *D) { DeclUpdate(UPD_CXX_INSTANTIATED_DEFAULT_ARGUMENT, D)); } +void ASTWriter::DefaultMemberInitializerInstantiated(const FieldDecl *D) { + assert(!WritingAST && "Already writing the AST!"); + if (!D->isFromASTFile()) + return; + + DeclUpdates[D].push_back( + DeclUpdate(UPD_CXX_INSTANTIATED_DEFAULT_MEMBER_INITIALIZER, D)); +} + void ASTWriter::AddedObjCCategoryToInterface(const ObjCCategoryDecl *CatD, const ObjCInterfaceDecl *IFD) { if (Chain && Chain->isProcessingUpdateRecords()) return; |