[clang] [clang][deps] Propagate the entire service (PR #128959)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 16:15:04 PST 2025


================
@@ -130,11 +130,11 @@ class DependencyScanningWorker {
                                   DependencyActionController &Controller,
                                   StringRef ModuleName);
 
-  bool shouldEagerLoadModules() const { return EagerLoadModules; }
-
   llvm::vfs::FileSystem &getVFS() const { return *BaseFS; }
 
 private:
+  /// The parent dependency scanning service.
+  DependencyScanningService &Service;
----------------
benlangmuir wrote:

I'm guessing no one is likely to break this rule in practice, but I would add a note to the `DependencyScanningWorker` and `DependencyScanningTool` constructors that the service must outlive the worker.

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


More information about the cfe-commits mailing list