[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Wed May 21 19:17:38 PDT 2025


================
@@ -654,6 +654,10 @@ class ASTReader
   /// Map from the TU to its lexical contents from each module file.
   std::vector<std::pair<ModuleFile*, LexicalContents>> TULexicalDecls;
 
+  unsigned HeaderFileInfoIdx = 0;
----------------
ChuanqiXu9 wrote:

And also, this seems unsafe since ModuleManager can remove modules technically. Maybe it is better to insert a bool in ModuleFile to mark if its header info is loaded. 

https://github.com/llvm/llvm-project/pull/140867


More information about the cfe-commits mailing list