[llvm] [PassManager] Drop Function.h and Module.h includes (NFC) (PR #96892)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 03:37:59 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Nikita Popov (nikic)

<details>
<summary>Changes</summary>

Replace them with forward declarations.

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


1 Files Affected:

- (modified) llvm/include/llvm/IR/PassManager.h (+3-2) 


``````````diff
diff --git a/llvm/include/llvm/IR/PassManager.h b/llvm/include/llvm/IR/PassManager.h
index 226eba7d8027a..d269221fac070 100644
--- a/llvm/include/llvm/IR/PassManager.h
+++ b/llvm/include/llvm/IR/PassManager.h
@@ -42,8 +42,6 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/TinyPtrVector.h"
 #include "llvm/IR/Analysis.h"
-#include "llvm/IR/Function.h"
-#include "llvm/IR/Module.h"
 #include "llvm/IR/PassManagerInternal.h"
 #include "llvm/Support/TypeName.h"
 #include <cassert>
@@ -58,6 +56,9 @@
 
 namespace llvm {
 
+class Function;
+class Module;
+
 // Forward declare the analysis manager template.
 template <typename IRUnitT, typename... ExtraArgTs> class AnalysisManager;
 

``````````

</details>


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


More information about the llvm-commits mailing list