Skip to content

Commit 64e8935

Browse files
[LTO] Remove unused includes (NFC) (#141355)
These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures.
1 parent 13c3df9 commit 64e8935

File tree

5 files changed

+0
-18
lines changed

5 files changed

+0
-18
lines changed

llvm/lib/LTO/LTO.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "llvm/Support/CommandLine.h"
4242
#include "llvm/Support/Error.h"
4343
#include "llvm/Support/FileSystem.h"
44-
#include "llvm/Support/FileUtilities.h"
4544
#include "llvm/Support/JSON.h"
4645
#include "llvm/Support/MemoryBuffer.h"
4746
#include "llvm/Support/Path.h"

llvm/lib/LTO/LTOBackend.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@
3535
#include "llvm/Support/FileSystem.h"
3636
#include "llvm/Support/MemoryBuffer.h"
3737
#include "llvm/Support/Path.h"
38-
#include "llvm/Support/Program.h"
3938
#include "llvm/Support/ThreadPool.h"
4039
#include "llvm/Support/ToolOutputFile.h"
4140
#include "llvm/Support/VirtualFileSystem.h"
4241
#include "llvm/Support/raw_ostream.h"
4342
#include "llvm/Target/TargetMachine.h"
4443
#include "llvm/TargetParser/SubtargetFeature.h"
4544
#include "llvm/Transforms/IPO/WholeProgramDevirt.h"
46-
#include "llvm/Transforms/Scalar/LoopPassManager.h"
4745
#include "llvm/Transforms/Utils/FunctionImportUtils.h"
4846
#include "llvm/Transforms/Utils/SplitModule.h"
4947
#include <optional>

llvm/lib/LTO/LTOCodeGenerator.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515

1616
#include "llvm/ADT/Statistic.h"
1717
#include "llvm/ADT/StringExtras.h"
18-
#include "llvm/Analysis/Passes.h"
1918
#include "llvm/Analysis/TargetLibraryInfo.h"
2019
#include "llvm/Analysis/TargetTransformInfo.h"
2120
#include "llvm/Bitcode/BitcodeWriter.h"
2221
#include "llvm/CodeGen/CommandFlags.h"
2322
#include "llvm/CodeGen/TargetSubtargetInfo.h"
2423
#include "llvm/Config/config.h"
25-
#include "llvm/IR/Constants.h"
2624
#include "llvm/IR/DataLayout.h"
2725
#include "llvm/IR/DebugInfo.h"
2826
#include "llvm/IR/DerivedTypes.h"
@@ -40,26 +38,21 @@
4038
#include "llvm/LTO/legacy/LTOModule.h"
4139
#include "llvm/LTO/legacy/UpdateCompilerUsed.h"
4240
#include "llvm/Linker/Linker.h"
43-
#include "llvm/MC/MCAsmInfo.h"
44-
#include "llvm/MC/MCContext.h"
4541
#include "llvm/MC/TargetRegistry.h"
4642
#include "llvm/Remarks/HotnessThresholdParser.h"
4743
#include "llvm/Support/CommandLine.h"
4844
#include "llvm/Support/FileSystem.h"
4945
#include "llvm/Support/MemoryBuffer.h"
5046
#include "llvm/Support/Process.h"
5147
#include "llvm/Support/Signals.h"
52-
#include "llvm/Support/TargetSelect.h"
5348
#include "llvm/Support/ToolOutputFile.h"
54-
#include "llvm/Support/YAMLTraits.h"
5549
#include "llvm/Support/raw_ostream.h"
5650
#include "llvm/Target/TargetOptions.h"
5751
#include "llvm/TargetParser/Host.h"
5852
#include "llvm/TargetParser/SubtargetFeature.h"
5953
#include "llvm/Transforms/IPO.h"
6054
#include "llvm/Transforms/IPO/Internalize.h"
6155
#include "llvm/Transforms/IPO/WholeProgramDevirt.h"
62-
#include "llvm/Transforms/ObjCARC.h"
6356
#include "llvm/Transforms/Utils/ModuleUtils.h"
6457
#include <optional>
6558
#include <system_error>

llvm/lib/LTO/LTOModule.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,15 @@
2121
#include "llvm/IR/Module.h"
2222
#include "llvm/MC/MCExpr.h"
2323
#include "llvm/MC/MCInst.h"
24-
#include "llvm/MC/MCParser/MCAsmParser.h"
2524
#include "llvm/MC/MCSection.h"
26-
#include "llvm/MC/MCSubtargetInfo.h"
2725
#include "llvm/MC/MCSymbol.h"
2826
#include "llvm/MC/TargetRegistry.h"
2927
#include "llvm/Object/IRObjectFile.h"
3028
#include "llvm/Object/MachO.h"
3129
#include "llvm/Object/ObjectFile.h"
3230
#include "llvm/Support/FileSystem.h"
3331
#include "llvm/Support/MemoryBuffer.h"
34-
#include "llvm/Support/Path.h"
3532
#include "llvm/Support/SourceMgr.h"
36-
#include "llvm/Support/TargetSelect.h"
3733
#include "llvm/Target/TargetLoweringObjectFile.h"
3834
#include "llvm/TargetParser/Host.h"
3935
#include "llvm/TargetParser/SubtargetFeature.h"

llvm/lib/LTO/ThinLTOCodeGenerator.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "llvm/ADT/ScopeExit.h"
1818
#include "llvm/ADT/Statistic.h"
1919
#include "llvm/ADT/StringExtras.h"
20-
#include "llvm/Analysis/AliasAnalysis.h"
2120
#include "llvm/Analysis/ModuleSummaryAnalysis.h"
2221
#include "llvm/Analysis/ProfileSummaryInfo.h"
2322
#include "llvm/Analysis/TargetLibraryInfo.h"
@@ -58,11 +57,8 @@
5857
#include "llvm/Transforms/IPO/FunctionImport.h"
5958
#include "llvm/Transforms/IPO/Internalize.h"
6059
#include "llvm/Transforms/IPO/WholeProgramDevirt.h"
61-
#include "llvm/Transforms/ObjCARC.h"
6260
#include "llvm/Transforms/Utils/FunctionImportUtils.h"
6361

64-
#include <numeric>
65-
6662
#if !defined(_MSC_VER) && !defined(__MINGW32__)
6763
#include <unistd.h>
6864
#else

0 commit comments

Comments
 (0)