vsapsai wrote: To clarify a little bit > [...] The "already included" state is global across all modules (which is > necessary so that non-modular headers don't get compiled into multiple > translation units and cause redeclaration errors).
The necessity isn't actually true. The same definition in multiple modules shouldn't confuse clang as long as these definitions are identical. But this is a side issue. To re-iterate what this change is about: 1. `#import` implies a file is a single-include 2. Textual header in a module map implies a file is a multi-include (aka re-entrant) 3. When we have both `#import` and the header marked as textual, `#import` "wins", i.e. the file is single-include 4. You want to make that when we have both `#import` and a textual header, textual should "win", i.e. the file should be multi-include Is it correct? https://github.com/llvm/llvm-project/pull/83660 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits