[clang] [clang] Enable making `CompilerInstance` diagnostics thread-safe (PR #136601)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 22 12:53:24 PDT 2025
================
@@ -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);
----------------
jansvoboda11 wrote:
(Done in the newest commit.)
https://github.com/llvm/llvm-project/pull/136601
More information about the cfe-commits
mailing list