[clang] [llvm] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (PR #107654)
Argyrios Kyrtzidis via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 15:51:48 PDT 2024
https://github.com/akyrtzi created https://github.com/llvm/llvm-project/pull/107654
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
>From c7a035190d3883dcd755cf208030c2fbbd5b8fcf Mon Sep 17 00:00:00 2001
From: Argyrios Kyrtzidis <kyrtzidis at apple.com>
Date: Fri, 6 Sep 2024 15:48:22 -0700
Subject: [PATCH] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build
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
---
clang/include/clang/Tooling/Inclusions/StandardLibrary.h | 1 +
llvm/include/llvm/Analysis/SyntheticCountsUtils.h | 1 +
llvm/include/llvm/Transforms/InstCombine/InstCombiner.h | 1 +
3 files changed, 3 insertions(+)
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"
More information about the cfe-commits
mailing list