[llvm] [ObjCopy] Remove unused includes (NFC) (PR #116534)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 17 00:31:50 PST 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/116534
Identified with misc-include-cleaner.
>From 051adc879f379ba394cbcb597b2942412b3d7859 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 17 Nov 2024 00:07:05 -0800
Subject: [PATCH] [ObjCopy] Remove unused includes (NFC)
Identified with misc-include-cleaner.
---
llvm/lib/ObjCopy/Archive.cpp | 1 -
llvm/lib/ObjCopy/COFF/COFFObject.cpp | 1 -
llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp | 5 -----
llvm/lib/ObjCopy/ELF/ELFObject.cpp | 3 ---
llvm/lib/ObjCopy/MachO/MachOReader.cpp | 1 -
llvm/lib/ObjCopy/MachO/MachOWriter.cpp | 1 -
llvm/lib/ObjCopy/ObjCopy.cpp | 6 ++----
llvm/lib/ObjCopy/XCOFF/XCOFFObjcopy.cpp | 5 ++---
llvm/lib/ObjCopy/wasm/WasmObject.cpp | 3 ---
llvm/lib/ObjCopy/wasm/WasmWriter.cpp | 1 -
10 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/llvm/lib/ObjCopy/Archive.cpp b/llvm/lib/ObjCopy/Archive.cpp
index b6da4dc1e239c8..a221c64edf06bd 100644
--- a/llvm/lib/ObjCopy/Archive.cpp
+++ b/llvm/lib/ObjCopy/Archive.cpp
@@ -11,7 +11,6 @@
#include "llvm/ObjCopy/MultiFormatConfig.h"
#include "llvm/ObjCopy/ObjCopy.h"
#include "llvm/Object/Error.h"
-#include "llvm/Object/MachO.h"
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/SmallVectorMemoryBuffer.h"
diff --git a/llvm/lib/ObjCopy/COFF/COFFObject.cpp b/llvm/lib/ObjCopy/COFF/COFFObject.cpp
index 1d27b7eaa89188..5fa13391c908f7 100644
--- a/llvm/lib/ObjCopy/COFF/COFFObject.cpp
+++ b/llvm/lib/ObjCopy/COFF/COFFObject.cpp
@@ -8,7 +8,6 @@
#include "COFFObject.h"
#include "llvm/ADT/DenseSet.h"
-#include <algorithm>
namespace llvm {
namespace objcopy {
diff --git a/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp b/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
index 40598861d42731..4793651f1d4e0b 100644
--- a/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
+++ b/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
@@ -10,7 +10,6 @@
#include "ELFObject.h"
#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
@@ -28,16 +27,12 @@
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/ErrorOr.h"
-#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Memory.h"
-#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <functional>
-#include <iterator>
#include <memory>
#include <string>
#include <system_error>
diff --git a/llvm/lib/ObjCopy/ELF/ELFObject.cpp b/llvm/lib/ObjCopy/ELF/ELFObject.cpp
index fd55f974115a24..01c2f24629077a 100644
--- a/llvm/lib/ObjCopy/ELF/ELFObject.cpp
+++ b/llvm/lib/ObjCopy/ELF/ELFObject.cpp
@@ -15,12 +15,9 @@
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCELFExtras.h"
#include "llvm/MC/MCTargetOptions.h"
-#include "llvm/Object/ELF.h"
-#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/Path.h"
#include <algorithm>
#include <cstddef>
diff --git a/llvm/lib/ObjCopy/MachO/MachOReader.cpp b/llvm/lib/ObjCopy/MachO/MachOReader.cpp
index 4549977c12c3db..2b344f36d8e78b 100644
--- a/llvm/lib/ObjCopy/MachO/MachOReader.cpp
+++ b/llvm/lib/ObjCopy/MachO/MachOReader.cpp
@@ -10,7 +10,6 @@
#include "MachOObject.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Object/MachO.h"
-#include "llvm/Support/Errc.h"
#include "llvm/Support/SystemZ/zOSSupport.h"
#include <memory>
diff --git a/llvm/lib/ObjCopy/MachO/MachOWriter.cpp b/llvm/lib/ObjCopy/MachO/MachOWriter.cpp
index 1ff741c830bdb4..7c24d1277dc8d7 100644
--- a/llvm/lib/ObjCopy/MachO/MachOWriter.cpp
+++ b/llvm/lib/ObjCopy/MachO/MachOWriter.cpp
@@ -11,7 +11,6 @@
#include "MachOObject.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/BinaryFormat/MachO.h"
-#include "llvm/Object/MachO.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SHA256.h"
diff --git a/llvm/lib/ObjCopy/ObjCopy.cpp b/llvm/lib/ObjCopy/ObjCopy.cpp
index 16968d2022657f..54dab11c4b1921 100644
--- a/llvm/lib/ObjCopy/ObjCopy.cpp
+++ b/llvm/lib/ObjCopy/ObjCopy.cpp
@@ -9,16 +9,15 @@
#include "llvm/ObjCopy/ObjCopy.h"
#include "llvm/ObjCopy/COFF/COFFConfig.h"
#include "llvm/ObjCopy/COFF/COFFObjcopy.h"
-#include "llvm/ObjCopy/CommonConfig.h"
#include "llvm/ObjCopy/ELF/ELFConfig.h"
#include "llvm/ObjCopy/ELF/ELFObjcopy.h"
#include "llvm/ObjCopy/MachO/MachOConfig.h"
#include "llvm/ObjCopy/MachO/MachOObjcopy.h"
#include "llvm/ObjCopy/MultiFormatConfig.h"
-#include "llvm/ObjCopy/wasm/WasmConfig.h"
-#include "llvm/ObjCopy/wasm/WasmObjcopy.h"
#include "llvm/ObjCopy/XCOFF/XCOFFConfig.h"
#include "llvm/ObjCopy/XCOFF/XCOFFObjcopy.h"
+#include "llvm/ObjCopy/wasm/WasmConfig.h"
+#include "llvm/ObjCopy/wasm/WasmObjcopy.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Object/Error.h"
@@ -26,7 +25,6 @@
#include "llvm/Object/MachOUniversal.h"
#include "llvm/Object/Wasm.h"
#include "llvm/Object/XCOFFObjectFile.h"
-#include "llvm/Support/SmallVectorMemoryBuffer.h"
namespace llvm {
namespace objcopy {
diff --git a/llvm/lib/ObjCopy/XCOFF/XCOFFObjcopy.cpp b/llvm/lib/ObjCopy/XCOFF/XCOFFObjcopy.cpp
index f6e29bd315cb13..7db06b42adc77e 100644
--- a/llvm/lib/ObjCopy/XCOFF/XCOFFObjcopy.cpp
+++ b/llvm/lib/ObjCopy/XCOFF/XCOFFObjcopy.cpp
@@ -6,13 +6,12 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/ObjCopy/CommonConfig.h"
-#include "llvm/ObjCopy/XCOFF/XCOFFConfig.h"
#include "llvm/ObjCopy/XCOFF/XCOFFObjcopy.h"
-#include "llvm/Support/Errc.h"
#include "XCOFFObject.h"
#include "XCOFFReader.h"
#include "XCOFFWriter.h"
+#include "llvm/ObjCopy/CommonConfig.h"
+#include "llvm/ObjCopy/XCOFF/XCOFFConfig.h"
namespace llvm {
namespace objcopy {
diff --git a/llvm/lib/ObjCopy/wasm/WasmObject.cpp b/llvm/lib/ObjCopy/wasm/WasmObject.cpp
index 0b543b793f049e..991191320c40b8 100644
--- a/llvm/lib/ObjCopy/wasm/WasmObject.cpp
+++ b/llvm/lib/ObjCopy/wasm/WasmObject.cpp
@@ -8,9 +8,6 @@
#include "WasmObject.h"
-#include "llvm/Support/LEB128.h"
-#include "llvm/Support/raw_ostream.h"
-
namespace llvm {
namespace objcopy {
namespace wasm {
diff --git a/llvm/lib/ObjCopy/wasm/WasmWriter.cpp b/llvm/lib/ObjCopy/wasm/WasmWriter.cpp
index ad4d2ef2ad930a..2f1874020f7fd9 100644
--- a/llvm/lib/ObjCopy/wasm/WasmWriter.cpp
+++ b/llvm/lib/ObjCopy/wasm/WasmWriter.cpp
@@ -9,7 +9,6 @@
#include "WasmWriter.h"
#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/Support/Endian.h"
-#include "llvm/Support/Errc.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/raw_ostream.h"
More information about the llvm-commits
mailing list