[clang] [clang][modules] Deserialize submodules lazily (PR #194968)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 13:47:46 PDT 2026
================
@@ -48,9 +48,17 @@ namespace clang {
class FileManager;
class LangOptions;
+class Module;
class ModuleMap;
class TargetInfo;
+/// Interface for on-demand deserialization of submodules stored in a PCM file.
+class ExternalSubmoduleSource {
+public:
+ virtual Module *getSubmodule(uint32_t GlobalID) = 0;
----------------
jansvoboda11 wrote:
I agree that's marginally better name, but there's already `ASTReader::getSubmodule()` that I wanted to reuse. That avoids the need to either update existing call sites to from `getSubmodule()` to `readSubmodule()` (or have `ASTReader::getSubmodule()` just come a shim that forwards to `ExternalSubmoduleSource::readSubmodule()`).
https://github.com/llvm/llvm-project/pull/194968
More information about the cfe-commits
mailing list