[C++20][Modules] Correct an assert for modules-ts.

When adding the support for modules partitions we added an assert that the
actual status of Global Module Fragments matches the state machine that is
driven by the module; keyword.

That does not apply to the modules-ts case, where there is an implicit GMF.

Differential Revision: https://reviews.llvm.org/D122394
This commit is contained in:
Iain Sandoe 2022-03-24 13:10:38 +00:00
parent 7e45912618
commit cf396c56e7
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc,
ModuleScopes.back().Module->Kind == Module::GlobalModuleFragment)
GlobalModuleFragment = ModuleScopes.back().Module;
assert((!getLangOpts().CPlusPlusModules ||
assert((!getLangOpts().CPlusPlusModules || getLangOpts().ModulesTS ||
SeenGMF == (bool)GlobalModuleFragment) &&
"mismatched global module state");