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) {
5704
5704
if (D->isFromASTFile ())
5705
5705
continue ;
5706
5706
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
-
5713
5707
// In reduced BMI, skip unreached declarations.
5714
5708
if (!wasDeclEmitted (D))
5715
5709
continue ;
@@ -6288,7 +6282,8 @@ bool ASTWriter::wasDeclEmitted(const Decl *D) const {
6288
6282
return true ;
6289
6283
6290
6284
bool Emitted = DeclIDs.contains (D);
6291
- assert ((Emitted || GeneratingReducedBMI) &&
6285
+ assert ((Emitted || (!D->getOwningModule () && isWritingStdCXXNamedModules ()) ||
6286
+ GeneratingReducedBMI) &&
6292
6287
" The declaration within modules can only be omitted in reduced BMI." );
6293
6288
return Emitted;
6294
6289
}
You can’t perform that action at this time.
0 commit comments