llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Naveen Seth Hanig (naveen-seth)

<details>
<summary>Changes</summary>

As pointed out in [the review of #<!-- 
-->15277](https://github.com/llvm/llvm-project/pull/152770#discussion_r2962823008),
 `DependencyScannerImpl.h` includes headers from the driver. However, the 
dependency scanning library does not depend on the driver at all. This PR fixes 
the include issue.

The dependency on the Driver was removed following the RFC: 
https://discourse.llvm.org/t/rfc-new-clangoptions-library-remove-dependency-on-clangdriver-from-clangfrontend-and-flangfrontend/88773

---
Full diff: https://github.com/llvm/llvm-project/pull/187599.diff


2 Files Affected:

- (modified) clang/include/clang/DependencyScanning/DependencyScannerImpl.h 
(-2) 
- (modified) clang/lib/Tooling/DependencyScanningTool.cpp (+2) 


``````````diff
diff --git a/clang/include/clang/DependencyScanning/DependencyScannerImpl.h 
b/clang/include/clang/DependencyScanning/DependencyScannerImpl.h
index 9b1aa22a5c9f8..55dcbd6fe0e9f 100644
--- a/clang/include/clang/DependencyScanning/DependencyScannerImpl.h
+++ b/clang/include/clang/DependencyScanning/DependencyScannerImpl.h
@@ -11,8 +11,6 @@
 
 #include "clang/DependencyScanning/DependencyScanningFilesystem.h"
 #include "clang/DependencyScanning/ModuleDepCollector.h"
-#include "clang/Driver/Compilation.h"
-#include "clang/Driver/Driver.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/CompilerInvocation.h"
 #include "clang/Frontend/TextDiagnosticPrinter.h"
diff --git a/clang/lib/Tooling/DependencyScanningTool.cpp 
b/clang/lib/Tooling/DependencyScanningTool.cpp
index adf0c10612468..d1f8805c6b24b 100644
--- a/clang/lib/Tooling/DependencyScanningTool.cpp
+++ b/clang/lib/Tooling/DependencyScanningTool.cpp
@@ -10,6 +10,8 @@
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/DiagnosticFrontend.h"
 #include "clang/DependencyScanning/DependencyScannerImpl.h"
+#include "clang/Driver/Compilation.h"
+#include "clang/Driver/Driver.h"
 #include "clang/Driver/Tool.h"
 #include "clang/Frontend/FrontendActions.h"
 #include "clang/Frontend/Utils.h"

``````````

</details>


https://github.com/llvm/llvm-project/pull/187599
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to