[clang] [llvm] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (PR #107654)

via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 15:52:16 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Argyrios Kyrtzidis (akyrtzi)

<details>
<summary>Changes</summary>

The errors fixed were:
* llvm-project/llvm/include/llvm/Analysis/SyntheticCountsUtils.h:33:22: error: missing '#include <__fwd/vector.h>'; default argument of 'vector' must be defined before it is used
* llvm-project/clang/include/clang/Tooling/Inclusions/StandardLibrary.h:41:15: error: missing '#include <vector>'; 'vector' must be declared before it is used
* llvm-project/llvm/include/llvm/Transforms/InstCombine/InstCombiner.h:83:3: error: missing '#include "llvm/ADT/PostOrderIterator.h"'; 'ReversePostOrderTraversal' must be declared before it is used

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


3 Files Affected:

- (modified) clang/include/clang/Tooling/Inclusions/StandardLibrary.h (+1) 
- (modified) llvm/include/llvm/Analysis/SyntheticCountsUtils.h (+1) 
- (modified) llvm/include/llvm/Transforms/InstCombine/InstCombiner.h (+1) 


``````````diff
diff --git a/clang/include/clang/Tooling/Inclusions/StandardLibrary.h b/clang/include/clang/Tooling/Inclusions/StandardLibrary.h
index a39ceb520dcf8a..147f505ade0584 100644
--- a/clang/include/clang/Tooling/Inclusions/StandardLibrary.h
+++ b/clang/include/clang/Tooling/Inclusions/StandardLibrary.h
@@ -21,6 +21,7 @@
 #include "llvm/Support/raw_ostream.h"
 #include <optional>
 #include <string>
+#include <vector>
 
 namespace clang {
 class Decl;
diff --git a/llvm/include/llvm/Analysis/SyntheticCountsUtils.h b/llvm/include/llvm/Analysis/SyntheticCountsUtils.h
index 8b61ac5ed8ca22..d9a477b72451f3 100644
--- a/llvm/include/llvm/Analysis/SyntheticCountsUtils.h
+++ b/llvm/include/llvm/Analysis/SyntheticCountsUtils.h
@@ -16,6 +16,7 @@
 #include "llvm/ADT/GraphTraits.h"
 #include "llvm/ADT/STLFunctionalExtras.h"
 #include "llvm/Support/ScaledNumber.h"
+#include <vector>
 
 namespace llvm {
 
diff --git a/llvm/include/llvm/Transforms/InstCombine/InstCombiner.h b/llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
index f5f16037bef893..87d0d98e691374 100644
--- a/llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
+++ b/llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
@@ -18,6 +18,7 @@
 #ifndef LLVM_TRANSFORMS_INSTCOMBINE_INSTCOMBINER_H
 #define LLVM_TRANSFORMS_INSTCOMBINE_INSTCOMBINER_H
 
+#include "llvm/ADT/PostOrderIterator.h"
 #include "llvm/Analysis/DomConditionCache.h"
 #include "llvm/Analysis/InstructionSimplify.h"
 #include "llvm/Analysis/TargetFolder.h"

``````````

</details>


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


More information about the cfe-commits mailing list