ilya-biryukov planned changes to this revision.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.

Richard, thanks for course correcting. I was under impression that header 
modules are not in the standard, my mistake.

It looks like this particular change actually breaks standard compatibility as 
we also use the same parsing action and don't build a module separately on 
`import`.

  [module.import]p5
  A module-import-declaration that specifies a header-name H imports a 
synthesized header unit, which is a
  translation unit formed by applying phases 1 to 7 of translation (5.2) to the 
source file or header nominated
  by H, which shall not contain a module-declaration.

We are definitely allowed to use the same parsing action for `#include` .

  [cpp.include]p7
  If the header identified by the header-name denotes an importable header 
(10.3), it is implementation-defined
  whether the #include preprocessing directive is instead replaced by an import 
directive (15.5) of the
  form

So the proposal is that `-fheader-modules=parse` would parse `#include` of 
header unit in the same TU, and import `.pcm` on `import`, right?

To take a step back, the original problem was to allow running layering checks 
without requiring `.pcm` files even in `-std=c++20`.
Are there alternatives I might be missing?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125773

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to