Skip to content

Commit 1e16e7f

Browse files
kazutakahiratasivan-shani
authored andcommitted
[lld] Remove unused includes (NFC) (llvm#141421)
1 parent e1c4771 commit 1e16e7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+0
-155
lines changed

lld/COFF/COFFLinkerContext.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111

1212
#include "COFFLinkerContext.h"
1313
#include "Symbols.h"
14-
#include "lld/Common/Memory.h"
1514
#include "llvm/BinaryFormat/COFF.h"
16-
#include "llvm/DebugInfo/CodeView/TypeHashing.h"
17-
#include "llvm/Demangle/Demangle.h"
1815

1916
namespace lld::coff {
2017
COFFLinkerContext::COFFLinkerContext()

lld/COFF/CallGraphSort.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "InputFiles.h"
1717
#include "SymbolTable.h"
1818
#include "Symbols.h"
19-
#include "lld/Common/ErrorHandler.h"
2019

2120
#include <numeric>
2221

lld/COFF/DebugTypes.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "DebugTypes.h"
1010
#include "COFFLinkerContext.h"
1111
#include "Chunks.h"
12-
#include "Driver.h"
1312
#include "InputFiles.h"
1413
#include "PDB.h"
1514
#include "TypeMerger.h"

lld/COFF/Driver.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "Writer.h"
2020
#include "lld/Common/Args.h"
2121
#include "lld/Common/CommonLinkerContext.h"
22-
#include "lld/Common/Driver.h"
2322
#include "lld/Common/Filesystem.h"
2423
#include "lld/Common/Timer.h"
2524
#include "lld/Common/Version.h"
@@ -28,7 +27,6 @@
2827
#include "llvm/BinaryFormat/Magic.h"
2928
#include "llvm/Config/llvm-config.h"
3029
#include "llvm/LTO/LTO.h"
31-
#include "llvm/Object/ArchiveWriter.h"
3230
#include "llvm/Object/COFFImportFile.h"
3331
#include "llvm/Option/Arg.h"
3432
#include "llvm/Option/ArgList.h"

lld/COFF/DriverUtils.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "Symbols.h"
1818
#include "lld/Common/ErrorHandler.h"
1919
#include "lld/Common/Memory.h"
20-
#include "llvm/ADT/STLExtras.h"
2120
#include "llvm/ADT/StringExtras.h"
2221
#include "llvm/ADT/StringSwitch.h"
2322
#include "llvm/BinaryFormat/COFF.h"
@@ -28,14 +27,11 @@
2827
#include "llvm/Option/ArgList.h"
2928
#include "llvm/Option/Option.h"
3029
#include "llvm/Support/CommandLine.h"
31-
#include "llvm/Support/FileUtilities.h"
3230
#include "llvm/Support/MathExtras.h"
3331
#include "llvm/Support/Process.h"
3432
#include "llvm/Support/Program.h"
35-
#include "llvm/Support/TimeProfiler.h"
3633
#include "llvm/Support/raw_ostream.h"
3734
#include "llvm/WindowsManifest/WindowsManifestMerger.h"
38-
#include <limits>
3935
#include <memory>
4036
#include <optional>
4137

lld/COFF/ICF.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@
2121
#include "COFFLinkerContext.h"
2222
#include "Chunks.h"
2323
#include "Symbols.h"
24-
#include "lld/Common/ErrorHandler.h"
2524
#include "lld/Common/Timer.h"
26-
#include "llvm/ADT/Hashing.h"
27-
#include "llvm/Support/Debug.h"
2825
#include "llvm/Support/Parallel.h"
2926
#include "llvm/Support/TimeProfiler.h"
30-
#include "llvm/Support/raw_ostream.h"
3127
#include "llvm/Support/xxhash.h"
3228
#include <algorithm>
3329
#include <atomic>

lld/COFF/InputFiles.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "SymbolTable.h"
1616
#include "Symbols.h"
1717
#include "lld/Common/DWARF.h"
18-
#include "llvm-c/lto.h"
1918
#include "llvm/ADT/SmallVector.h"
2019
#include "llvm/ADT/Twine.h"
2120
#include "llvm/BinaryFormat/COFF.h"
@@ -33,14 +32,11 @@
3332
#include "llvm/Support/Casting.h"
3433
#include "llvm/Support/Endian.h"
3534
#include "llvm/Support/Error.h"
36-
#include "llvm/Support/ErrorOr.h"
3735
#include "llvm/Support/FileSystem.h"
3836
#include "llvm/Support/Path.h"
39-
#include "llvm/Target/TargetOptions.h"
4037
#include "llvm/TargetParser/Triple.h"
4138
#include <cstring>
4239
#include <optional>
43-
#include <system_error>
4440
#include <utility>
4541

4642
using namespace llvm;

lld/COFF/LTO.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,19 @@
1717
#include "lld/Common/Strings.h"
1818
#include "lld/Common/TargetOptionsCommandFlags.h"
1919
#include "llvm/ADT/STLExtras.h"
20-
#include "llvm/ADT/SmallString.h"
2120
#include "llvm/ADT/StringRef.h"
2221
#include "llvm/ADT/Twine.h"
2322
#include "llvm/Bitcode/BitcodeWriter.h"
2423
#include "llvm/IR/DiagnosticPrinter.h"
2524
#include "llvm/LTO/Config.h"
2625
#include "llvm/LTO/LTO.h"
27-
#include "llvm/Object/SymbolicFile.h"
2826
#include "llvm/Support/Caching.h"
2927
#include "llvm/Support/CodeGen.h"
30-
#include "llvm/Support/Error.h"
31-
#include "llvm/Support/FileSystem.h"
3228
#include "llvm/Support/MemoryBuffer.h"
3329
#include "llvm/Support/raw_ostream.h"
34-
#include <algorithm>
3530
#include <cstddef>
3631
#include <memory>
3732
#include <string>
38-
#include <system_error>
3933
#include <vector>
4034

4135
using namespace llvm;

lld/COFF/MapFile.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "SymbolTable.h"
3333
#include "Symbols.h"
3434
#include "Writer.h"
35-
#include "lld/Common/ErrorHandler.h"
3635
#include "lld/Common/Timer.h"
3736
#include "llvm/Support/Parallel.h"
3837
#include "llvm/Support/Path.h"

lld/COFF/MarkLive.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
#include "Chunks.h"
1111
#include "Symbols.h"
1212
#include "lld/Common/Timer.h"
13-
#include "llvm/ADT/STLExtras.h"
1413
#include "llvm/Support/TimeProfiler.h"
15-
#include <vector>
1614

1715
namespace lld::coff {
1816

lld/COFF/MinGW.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "SymbolTable.h"
1414
#include "llvm/ADT/DenseMap.h"
1515
#include "llvm/ADT/DenseSet.h"
16-
#include "llvm/Object/COFF.h"
1716
#include "llvm/Support/Parallel.h"
1817
#include "llvm/Support/Path.h"
1918
#include "llvm/Support/TimeProfiler.h"

lld/COFF/PDB.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,12 @@
2121
#include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h"
2222
#include "llvm/DebugInfo/CodeView/DebugLinesSubsection.h"
2323
#include "llvm/DebugInfo/CodeView/DebugSubsectionRecord.h"
24-
#include "llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h"
25-
#include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h"
26-
#include "llvm/DebugInfo/CodeView/MergingTypeTableBuilder.h"
2724
#include "llvm/DebugInfo/CodeView/RecordName.h"
28-
#include "llvm/DebugInfo/CodeView/SymbolDeserializer.h"
2925
#include "llvm/DebugInfo/CodeView/SymbolRecordHelpers.h"
3026
#include "llvm/DebugInfo/CodeView/SymbolSerializer.h"
3127
#include "llvm/DebugInfo/CodeView/TypeIndexDiscovery.h"
3228
#include "llvm/DebugInfo/MSF/MSFBuilder.h"
33-
#include "llvm/DebugInfo/MSF/MSFCommon.h"
3429
#include "llvm/DebugInfo/MSF/MSFError.h"
35-
#include "llvm/DebugInfo/PDB/GenericError.h"
3630
#include "llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h"
3731
#include "llvm/DebugInfo/PDB/Native/DbiStream.h"
3832
#include "llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h"
@@ -46,14 +40,10 @@
4640
#include "llvm/DebugInfo/PDB/Native/TpiHashing.h"
4741
#include "llvm/DebugInfo/PDB/Native/TpiStream.h"
4842
#include "llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h"
49-
#include "llvm/DebugInfo/PDB/PDB.h"
5043
#include "llvm/Object/COFF.h"
5144
#include "llvm/Object/CVDebugRecord.h"
52-
#include "llvm/Support/BinaryByteStream.h"
5345
#include "llvm/Support/CRC.h"
5446
#include "llvm/Support/Endian.h"
55-
#include "llvm/Support/Errc.h"
56-
#include "llvm/Support/FormatAdapters.h"
5747
#include "llvm/Support/FormatVariadic.h"
5848
#include "llvm/Support/Path.h"
5949
#include "llvm/Support/ScopedPrinter.h"

lld/COFF/Symbols.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@
1010
#include "COFFLinkerContext.h"
1111
#include "InputFiles.h"
1212
#include "lld/Common/ErrorHandler.h"
13-
#include "lld/Common/Memory.h"
14-
#include "lld/Common/Strings.h"
15-
#include "llvm/ADT/STLExtras.h"
1613
#include "llvm/Demangle/Demangle.h"
17-
#include "llvm/Support/Debug.h"
18-
#include "llvm/Support/raw_ostream.h"
1914

2015
using namespace llvm;
2116
using namespace llvm::object;

lld/COFF/Writer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,9 @@
2424
#include "llvm/ADT/STLExtras.h"
2525
#include "llvm/ADT/StringSet.h"
2626
#include "llvm/BinaryFormat/COFF.h"
27-
#include "llvm/Support/BinaryStreamReader.h"
28-
#include "llvm/Support/Debug.h"
2927
#include "llvm/Support/Endian.h"
3028
#include "llvm/Support/FileOutputBuffer.h"
3129
#include "llvm/Support/Parallel.h"
32-
#include "llvm/Support/Path.h"
3330
#include "llvm/Support/RandomNumberGenerator.h"
3431
#include "llvm/Support/TimeProfiler.h"
3532
#include "llvm/Support/xxhash.h"

lld/Common/ErrorHandler.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
#include "lld/Common/ErrorHandler.h"
1010

11-
#include "llvm/Support/Parallel.h"
12-
1311
#include "lld/Common/CommonLinkerContext.h"
1412
#include "llvm/ADT/Twine.h"
1513
#include "llvm/IR/DiagnosticInfo.h"

lld/ELF/AArch64ErrataFix.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
#include "Symbols.h"
3434
#include "SyntheticSections.h"
3535
#include "Target.h"
36-
#include "lld/Common/CommonLinkerContext.h"
37-
#include "lld/Common/Strings.h"
3836
#include "llvm/ADT/StringExtras.h"
3937
#include "llvm/Support/Endian.h"
4038
#include <algorithm>

lld/ELF/ARMErrataFix.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
#include "Symbols.h"
2222
#include "SyntheticSections.h"
2323
#include "Target.h"
24-
#include "lld/Common/CommonLinkerContext.h"
25-
#include "lld/Common/Strings.h"
2624
#include "llvm/Support/Endian.h"
2725
#include <algorithm>
2826

lld/ELF/Arch/AArch64.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "Symbols.h"
1212
#include "SyntheticSections.h"
1313
#include "Target.h"
14-
#include "lld/Common/ErrorHandler.h"
1514
#include "llvm/BinaryFormat/ELF.h"
1615
#include "llvm/Support/Endian.h"
1716

lld/ELF/Arch/ARM.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "Symbols.h"
1313
#include "SyntheticSections.h"
1414
#include "Target.h"
15-
#include "lld/Common/ErrorHandler.h"
1615
#include "lld/Common/Filesystem.h"
1716
#include "llvm/BinaryFormat/ELF.h"
1817
#include "llvm/Support/Endian.h"

lld/ELF/Arch/AVR.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "Symbols.h"
3030
#include "Target.h"
3131
#include "Thunks.h"
32-
#include "lld/Common/ErrorHandler.h"
3332
#include "llvm/BinaryFormat/ELF.h"
3433
#include "llvm/Support/Endian.h"
3534

lld/ELF/Arch/Hexagon.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "Symbols.h"
1111
#include "SyntheticSections.h"
1212
#include "Target.h"
13-
#include "lld/Common/ErrorHandler.h"
1413
#include "llvm/BinaryFormat/ELF.h"
1514
#include "llvm/Support/Endian.h"
1615

lld/ELF/Arch/MSP430.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include "Symbols.h"
1919
#include "Target.h"
20-
#include "lld/Common/ErrorHandler.h"
2120
#include "llvm/BinaryFormat/ELF.h"
2221
#include "llvm/Support/Endian.h"
2322

lld/ELF/Arch/Mips.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "InputFiles.h"
10-
#include "OutputSections.h"
1110
#include "Symbols.h"
1211
#include "SyntheticSections.h"
1312
#include "Target.h"
14-
#include "lld/Common/ErrorHandler.h"
1513
#include "llvm/BinaryFormat/ELF.h"
1614

1715
using namespace llvm;

lld/ELF/Arch/MipsArchTree.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
#include "InputFiles.h"
1414
#include "SymbolTable.h"
1515
#include "Target.h"
16-
#include "Writer.h"
1716

18-
#include "lld/Common/ErrorHandler.h"
1917
#include "llvm/BinaryFormat/ELF.h"
2018
#include "llvm/Support/MipsABIFlags.h"
2119

lld/ELF/Arch/PPC.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include "SyntheticSections.h"
1212
#include "Target.h"
1313
#include "Thunks.h"
14-
#include "lld/Common/ErrorHandler.h"
15-
#include "llvm/Support/Endian.h"
1614

1715
using namespace llvm;
1816
using namespace llvm::support::endian;

lld/ELF/Arch/PPC64.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#include "SyntheticSections.h"
1414
#include "Target.h"
1515
#include "Thunks.h"
16-
#include "lld/Common/CommonLinkerContext.h"
17-
#include "llvm/Support/Endian.h"
1816

1917
using namespace llvm;
2018
using namespace llvm::object;

lld/ELF/Arch/SPARCV9.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "Symbols.h"
1010
#include "SyntheticSections.h"
1111
#include "Target.h"
12-
#include "lld/Common/ErrorHandler.h"
1312
#include "llvm/Support/Endian.h"
1413

1514
using namespace llvm;

lld/ELF/Arch/SystemZ.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "Symbols.h"
1111
#include "SyntheticSections.h"
1212
#include "Target.h"
13-
#include "lld/Common/ErrorHandler.h"
1413
#include "llvm/BinaryFormat/ELF.h"
1514
#include "llvm/Support/Endian.h"
1615

lld/ELF/Arch/X86.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "Symbols.h"
1111
#include "SyntheticSections.h"
1212
#include "Target.h"
13-
#include "lld/Common/ErrorHandler.h"
1413
#include "llvm/Support/Endian.h"
1514

1615
using namespace llvm;

lld/ELF/Arch/X86_64.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "Symbols.h"
1212
#include "SyntheticSections.h"
1313
#include "Target.h"
14-
#include "lld/Common/ErrorHandler.h"
1514
#include "llvm/BinaryFormat/ELF.h"
1615
#include "llvm/Support/Endian.h"
1716
#include "llvm/Support/MathExtras.h"

lld/ELF/DWARF.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
#include "DWARF.h"
1717
#include "InputSection.h"
1818
#include "Symbols.h"
19-
#include "lld/Common/Memory.h"
20-
#include "llvm/DebugInfo/DWARF/DWARFDebugPubTable.h"
21-
#include "llvm/Object/ELFObjectFile.h"
2219

2320
using namespace llvm;
2421
using namespace llvm::object;

lld/ELF/Driver.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,10 @@
3939
#include "Writer.h"
4040
#include "lld/Common/Args.h"
4141
#include "lld/Common/CommonLinkerContext.h"
42-
#include "lld/Common/Driver.h"
4342
#include "lld/Common/ErrorHandler.h"
4443
#include "lld/Common/Filesystem.h"
4544
#include "lld/Common/Memory.h"
4645
#include "lld/Common/Strings.h"
47-
#include "lld/Common/TargetOptionsCommandFlags.h"
4846
#include "lld/Common/Version.h"
4947
#include "llvm/ADT/STLExtras.h"
5048
#include "llvm/ADT/SetVector.h"

lld/ELF/EhFrame.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
#include "InputSection.h"
2222
#include "Relocations.h"
2323
#include "Target.h"
24-
#include "lld/Common/ErrorHandler.h"
25-
#include "lld/Common/Strings.h"
2624
#include "llvm/BinaryFormat/Dwarf.h"
27-
#include "llvm/Object/ELF.h"
2825

2926
using namespace llvm;
3027
using namespace llvm::ELF;

lld/ELF/ICF.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
#include "Symbols.h"
8282
#include "SyntheticSections.h"
8383
#include "llvm/BinaryFormat/ELF.h"
84-
#include "llvm/Object/ELF.h"
8584
#include "llvm/Support/Parallel.h"
8685
#include "llvm/Support/TimeProfiler.h"
8786
#include "llvm/Support/xxhash.h"

0 commit comments

Comments
 (0)