File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -5704,12 +5704,6 @@ void ASTWriter::WriteDeclAndTypes(ASTContext &Context) {
57045704 if (D->isFromASTFile ())
57055705 continue ;
57065706
5707- // Skip writing implicit declarations not owning by the current module.
5708- // See the implementation of PrepareWritingSpecialDecls for example.
5709- if (isWritingStdCXXNamedModules () && !D->getOwningModule () &&
5710- D->isImplicit ())
5711- continue ;
5712-
57135707 // In reduced BMI, skip unreached declarations.
57145708 if (!wasDeclEmitted (D))
57155709 continue ;
@@ -6288,7 +6282,8 @@ bool ASTWriter::wasDeclEmitted(const Decl *D) const {
62886282 return true ;
62896283
62906284 bool Emitted = DeclIDs.contains (D);
6291- assert ((Emitted || GeneratingReducedBMI) &&
6285+ assert ((Emitted || (!D->getOwningModule () && isWritingStdCXXNamedModules ()) ||
6286+ GeneratingReducedBMI) &&
62926287 " The declaration within modules can only be omitted in reduced BMI." );
62936288 return Emitted;
62946289}
You can’t perform that action at this time.
0 commit comments