Revert "[C++20] [Modules] Don't load declaration eagerly for named modules"
This reverts commit af86957c. Close https://github.com/llvm/llvm-project/issues/61733. Previously I banned the eagerly loading for declarations from named modules to speedup the process of reading modules. But I didn't think about special decls like PragmaCommentDecl and PragmaDetectMismatchDecl. So here is the issue https://github.com/llvm/llvm-project/issues/61733. Note that the current behavior is still incorrect. Given: ``` // mod.cppm module; export module mod; ``` and ``` // user.cpp import mod; ``` Now the IR of `user.cpp` will contain the metadata '!0 = !{!"msvcprt.lib"}' incorrectly. The root cause of the problem is that `EagerlyDeserializedDecls` is designed for headers and it didn't take care for named modules. We need to redesign a new mechanism for named modules.
parent
766d048d
Please register or sign in to comment