[clang] [clang][DependencyScanning] Logging Dependency Scanning Events (PR #195896)

Michael Spencer via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 22 16:56:50 PDT 2026


================
@@ -89,6 +90,22 @@ bool DependencyScanningWorker::computeDependencies(
       return true;
     }
 
+    {
+      auto LogLine = Service.getLogger().log();
+      LogLine << "starting scanning command:";
+      for (const auto &C : Cmd) {
+        LogLine << " " << C;
+      }
+    }
----------------
Bigcheese wrote:

Did you check what the overhead is when logging is disabled? My expectation is that stuff like this loop still runs, but each `operator <<` exits early.

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


More information about the cfe-commits mailing list