[PATCH] D148176: [clang][modules] Avoid re-exporting PCH imports on every later module import

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 20 09:36:10 PDT 2023


benlangmuir added a comment.

In D148176#4283942 <https://reviews.llvm.org/D148176#4283942>, @jansvoboda11 wrote:

> Can you explain why we need to keep separate `PendingImportedModulesSema` now? In what situation will it end up aggregating more than one `PendingImportedModules`?

I don't know if this happens in practice, but I haven't been able to prove to myself that it cannot. I'm not sure there is much simplification we can get here regardless, because we still need some kind of state tracking here for the case when Sema is not provided until later.  If we are sure it can never add more `PendingImportedModules` later, then a flag telling us whether we have handled these modules in PP (but not yet Sema) would be sufficient.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148176/new/

https://reviews.llvm.org/D148176



More information about the cfe-commits mailing list