[C++20] [Modules] Don't load declaration eagerly for named modules
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Fri, 10 Mar 2023 06:15:08 +0000 (14:15 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Fri, 10 Mar 2023 06:57:21 +0000 (14:57 +0800)
commitaf86957cbbffd3dfff3c6750ebddf118aebd0069
treefbd4436f2c8b9ec0bcf6b96bb17677c156b52724
parent0b327814d86c7e09a6932efdbff6c83e55a2f06c
[C++20] [Modules] Don't load declaration eagerly for named modules

Close https://github.com/llvm/llvm-project/issues/61064.

The root cause of the issue is that we will deserilize some declarations
eagerly when reading the BMI. However, many declarations in the BMI are
not necessary for the importer. So it wastes a lot of time.
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/Modules/no-eager-load.cppm [new file with mode: 0644]