================
@@ -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:
I think it makes sense, since they are fairly orthogonal. On the other hand, I
don't have an actual use for that. Maybe I can package both of these into a
simple struct (`ThreadSafetyConfig`?) and pass that in `std::optional`. That'd
make things much more explicit than just asserts. WDYT?
https://github.com/llvm/llvm-project/pull/136601
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits