[llvm] [Analysis][NFC] Include LoopInfoImpl only in source file (PR #187459)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 19 01:50:16 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Alexis Engelke (aengelke)

<details>
<summary>Changes</summary>

There's no need to include the full LoopInfo implementation in every
source file that uses LoopInfo.


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


2 Files Affected:

- (modified) llvm/include/llvm/Analysis/LoopInfo.h (+1-1) 
- (modified) llvm/lib/Analysis/LoopInfo.cpp (+1) 


``````````diff
diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h
index fa023af70d983..d7131b909d8a2 100644
--- a/llvm/include/llvm/Analysis/LoopInfo.h
+++ b/llvm/include/llvm/Analysis/LoopInfo.h
@@ -18,7 +18,7 @@
 #include "llvm/IR/PassManager.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/Compiler.h"
-#include "llvm/Support/GenericLoopInfoImpl.h"
+#include "llvm/Support/GenericLoopInfo.h"
 #include <optional>
 #include <utility>
 
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index 0a932608f0d49..8e08a70e69cdd 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -38,6 +38,7 @@
 #include "llvm/InitializePasses.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm/Support/GenericLoopInfoImpl.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 

``````````

</details>


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


More information about the llvm-commits mailing list