[clang] [clang][modules] Allow specifying thread-safe module cache (PR #179510)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 3 16:48:29 PST 2026


================
@@ -872,20 +872,23 @@ class CompilerInstance : public ModuleLoader {
   class ThreadSafeCloneConfig {
     IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS;
     DiagnosticConsumer &DiagConsumer;
+    std::shared_ptr<ModuleCache> ModCache;
     std::shared_ptr<ModuleDependencyCollector> ModuleDepCollector;
 
   public:
     ThreadSafeCloneConfig(
         IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS,
-        DiagnosticConsumer &DiagConsumer,
+        DiagnosticConsumer &DiagConsumer, std::shared_ptr<ModuleCache> ModCache,
         std::shared_ptr<ModuleDependencyCollector> ModuleDepCollector = nullptr)
-        : VFS(std::move(VFS)), DiagConsumer(DiagConsumer),
+        : VFS(std::move(VFS)), DiagConsumer(DiagConsumer), ModCache(ModCache),
----------------
benlangmuir wrote:

Nit: `std::move(ModCache)`?

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


More information about the cfe-commits mailing list