================ @@ -861,9 +864,13 @@ class CompilerInstance : public ModuleLoader { /// /// Explicitly-specified \c VFS takes precedence over the VFS of this instance /// when creating the clone and also prevents \c FileManager sharing. - std::unique_ptr<CompilerInstance> cloneForModuleCompile( - SourceLocation ImportLoc, Module *Module, StringRef ModuleFileName, - IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = nullptr); + /// Explicitly-specified \c DiagConsumer takes precedence over forwarding to + /// this instance. + std::unique_ptr<CompilerInstance> + cloneForModuleCompile(SourceLocation ImportLoc, Module *Module, + StringRef ModuleFileName, + IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = nullptr, + DiagnosticConsumer *DiagConsumer = nullptr); ---------------- cyndyishida wrote:
Would it ever make sense to explicitly pass a `VFS` but not a `DiagConsumer`? or vice-versa? If not, maybe an assert should make that explicit. https://github.com/llvm/llvm-project/pull/136601 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits