================
@@ -3101,6 +3098,19 @@ void ASTWriter::WriteSubmodules(Module *WritingModule,
ASTContext *Context) {
Module *Mod = Q.front();
Q.pop();
unsigned ID = getSubmoduleID(Mod);
+ if (ID < FirstSubmoduleID) {
+ assert(0 && "Loaded submodule entered WritingModule ?");
----------------
jansvoboda11 wrote:
That was inspired by the logic used when writing `MacroInfosToEmit`. I think
unreachable has stronger semantics in that the branch can be optimized out in
non-assert builds, while I'd like to preserve the defensiveness of the current
scheme.
https://github.com/llvm/llvm-project/pull/194968
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits