jansvoboda11 added a comment. I'm interested in hearing some feedback whether the direction I'm taking here makes sense.
There are a couple of TODOs (mostly on optimizing away unnecessary maps) and a few modules-ts tests are failing. @rsmith left a suggestion on D104344 <https://reviews.llvm.org/D104344> to track this information in `Preprocessor::SubmoduleState`, which has similar semantics to what I'm doing with `Preprocessor::IncludeMap` (dividing the state during submodule compilation). The issue is that it (`Preprocessor::Submodules`) is really only enabled when Clang gets invoked with `-fmodules-local-submodule-visibility`. To keep its current semantics and make it usable for our use-case (which needs to work even without the flag), I think we'd need to **always** track the submodule state and conditionally **merge** the outer and local macro states as we now do for `IncludeMap` in `PPLexerChange.cpp`. I'm not really sure this is correct/feasible. Any opinions on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112915/new/ https://reviews.llvm.org/D112915 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits