[llvm] [Frontend] Remove unused includes (NFC) (PR #116927)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 22:13:24 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-openacc
@llvm/pr-subscribers-hlsl
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
Identified with misc-include-cleaner.
---
Full diff: https://github.com/llvm/llvm-project/pull/116927.diff
6 Files Affected:
- (modified) llvm/lib/Frontend/Atomic/Atomic.cpp (-5)
- (modified) llvm/lib/Frontend/HLSL/HLSLResource.cpp (-1)
- (modified) llvm/lib/Frontend/Offloading/Utility.cpp (-1)
- (modified) llvm/lib/Frontend/OpenACC/ACC.cpp (-2)
- (modified) llvm/lib/Frontend/OpenMP/OMP.cpp (-4)
- (modified) llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp (-1)
``````````diff
diff --git a/llvm/lib/Frontend/Atomic/Atomic.cpp b/llvm/lib/Frontend/Atomic/Atomic.cpp
index 03b476d113bd48..b54312293f9b06 100644
--- a/llvm/lib/Frontend/Atomic/Atomic.cpp
+++ b/llvm/lib/Frontend/Atomic/Atomic.cpp
@@ -8,11 +8,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Frontend/Atomic/Atomic.h"
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/Frontend/Atomic/Atomic.h"
-#include "llvm/IR/DataLayout.h"
-#include "llvm/IR/Intrinsics.h"
-#include "llvm/IR/Operator.h"
namespace {} // namespace
diff --git a/llvm/lib/Frontend/HLSL/HLSLResource.cpp b/llvm/lib/Frontend/HLSL/HLSLResource.cpp
index dd2b0b60bc19bf..48310d4f28e67e 100644
--- a/llvm/lib/Frontend/HLSL/HLSLResource.cpp
+++ b/llvm/lib/Frontend/HLSL/HLSLResource.cpp
@@ -13,7 +13,6 @@
#include "llvm/Frontend/HLSL/HLSLResource.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Metadata.h"
-#include "llvm/IR/Module.h"
using namespace llvm;
using namespace llvm::hlsl;
diff --git a/llvm/lib/Frontend/Offloading/Utility.cpp b/llvm/lib/Frontend/Offloading/Utility.cpp
index 7a0a7afcfcb5c9..9e85ffbfe22d70 100644
--- a/llvm/lib/Frontend/Offloading/Utility.cpp
+++ b/llvm/lib/Frontend/Offloading/Utility.cpp
@@ -16,7 +16,6 @@
#include "llvm/IR/Value.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Support/MemoryBufferRef.h"
-#include "llvm/Support/YAMLTraits.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
using namespace llvm;
diff --git a/llvm/lib/Frontend/OpenACC/ACC.cpp b/llvm/lib/Frontend/OpenACC/ACC.cpp
index 1e0516021bc6d2..07e67fbec79dd5 100644
--- a/llvm/lib/Frontend/OpenACC/ACC.cpp
+++ b/llvm/lib/Frontend/OpenACC/ACC.cpp
@@ -8,9 +8,7 @@
#include "llvm/Frontend/OpenACC/ACC.h.inc"
-#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
-#include "llvm/Support/ErrorHandling.h"
using namespace llvm;
using namespace acc;
diff --git a/llvm/lib/Frontend/OpenMP/OMP.cpp b/llvm/lib/Frontend/OpenMP/OMP.cpp
index fdb09678d7a4cc..37b778417fc24e 100644
--- a/llvm/lib/Frontend/OpenMP/OMP.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMP.cpp
@@ -9,15 +9,11 @@
#include "llvm/Frontend/OpenMP/OMP.h"
#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/StringSwitch.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/StringSaver.h"
#include <algorithm>
#include <cstdio>
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index d2e4dc1c85dfd2..59d34f67f8cfbc 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -59,7 +59,6 @@
#include <cstdint>
#include <optional>
-#include <stack>
#define DEBUG_TYPE "openmp-ir-builder"
``````````
</details>
https://github.com/llvm/llvm-project/pull/116927
More information about the llvm-commits
mailing list