3 Commits

Author SHA1 Message Date
Chuanqi Xu
2cbd1bc830 Revert "[C++20] [Modules] Embed all source files for C++20 Modules (#102444)"
This reverts commit 2eeeff842f993a694159183a2834b4d305549cad.

See the post commit discussion in
2eeeff842f
2024-09-03 10:54:20 +08:00
Chuanqi Xu
2eeeff842f
[C++20] [Modules] Embed all source files for C++20 Modules (#102444)
Close https://github.com/llvm/llvm-project/issues/72383

The implementation rationale is, I don't want to pass
`-fmodules-embed-all-files` all the time since we can't test it in lit
tests (we're using `clang_cc1`). So I tried to set it in FrontendActions
for modules.
2024-08-29 16:06:03 +08:00
Chuanqi Xu
7ec342ba16 [C++20] [Modules] [Reduced BMI] Write Special Decl Lazily
ASTWrite would write some special records for the consumer of the AST
can get the information easily. This is fine. But currently all the
special records are written eagerly, which is conflicting with reduced
BMI.

In reduced BMI, we hope to write things as less as possible. It is not a
goal for reduced BMI to retain all the informations. So in this patch we
won't record the special declarations eagerly before we starting write.
But only writing the sepcial records after we writes decls and types,
then only the reached declarations will be collected.
2024-04-18 14:35:38 +08:00