[lld] fc7a718 - [lld-macho][nfc] Clean up includes

Vy Nguyen via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 10:56:41 PDT 2022


Author: Vy Nguyen
Date: 2022-10-19T13:56:24-04:00
New Revision: fc7a71890d80a8d556dfee4555872916895ec663

URL: https://github.com/llvm/llvm-project/commit/fc7a71890d80a8d556dfee4555872916895ec663
DIFF: https://github.com/llvm/llvm-project/commit/fc7a71890d80a8d556dfee4555872916895ec663.diff

LOG: [lld-macho][nfc] Clean up includes

- remove unused/duplicate includes
- reformatting/whitespaces

Differential Revision: https://reviews.llvm.org/D136266

Added: 
    

Modified: 
    lld/MachO/InputSection.cpp
    lld/MachO/MapFile.cpp
    lld/MachO/MarkLive.cpp
    lld/MachO/ObjC.cpp
    lld/MachO/SectionPriorities.cpp
    lld/MachO/Symbols.h
    lld/MachO/SyntheticSections.h
    lld/MachO/UnwindInfoSection.cpp
    lld/MachO/UnwindInfoSection.h
    lld/MachO/Writer.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/InputSection.cpp b/lld/MachO/InputSection.cpp
index f9a3a6f7a6a4b..1ef7ae5bb9c58 100644
--- a/lld/MachO/InputSection.cpp
+++ b/lld/MachO/InputSection.cpp
@@ -16,6 +16,8 @@
 #include "Target.h"
 #include "UnwindInfoSection.h"
 #include "Writer.h"
+
+#include "lld/Common/ErrorHandler.h"
 #include "lld/Common/Memory.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/xxhash.h"

diff  --git a/lld/MachO/MapFile.cpp b/lld/MachO/MapFile.cpp
index 1f0a9ba44a5d9..d89b080eab2ad 100644
--- a/lld/MachO/MapFile.cpp
+++ b/lld/MachO/MapFile.cpp
@@ -33,6 +33,7 @@
 #include "Symbols.h"
 #include "SyntheticSections.h"
 #include "Target.h"
+#include "lld/Common/ErrorHandler.h"
 #include "llvm/Support/Parallel.h"
 #include "llvm/Support/TimeProfiler.h"
 

diff  --git a/lld/MachO/MarkLive.cpp b/lld/MachO/MarkLive.cpp
index 2ad85c62d047b..a37213d5613af 100644
--- a/lld/MachO/MarkLive.cpp
+++ b/lld/MachO/MarkLive.cpp
@@ -12,9 +12,12 @@
 #include "SymbolTable.h"
 #include "Symbols.h"
 #include "UnwindInfoSection.h"
-#include "mach-o/compact_unwind_encoding.h"
+
+#include "lld/Common/ErrorHandler.h"
 #include "llvm/Support/TimeProfiler.h"
 
+#include "mach-o/compact_unwind_encoding.h"
+
 namespace lld::macho {
 
 using namespace llvm;

diff  --git a/lld/MachO/ObjC.cpp b/lld/MachO/ObjC.cpp
index fbc129cf65896..d484c4029f6be 100644
--- a/lld/MachO/ObjC.cpp
+++ b/lld/MachO/ObjC.cpp
@@ -12,6 +12,7 @@
 #include "OutputSegment.h"
 #include "Target.h"
 
+#include "lld/Common/ErrorHandler.h"
 #include "llvm/BinaryFormat/MachO.h"
 #include "llvm/Bitcode/BitcodeReader.h"
 

diff  --git a/lld/MachO/SectionPriorities.cpp b/lld/MachO/SectionPriorities.cpp
index fbc7796c3f8a7..e5b98297da3a3 100644
--- a/lld/MachO/SectionPriorities.cpp
+++ b/lld/MachO/SectionPriorities.cpp
@@ -26,6 +26,7 @@
 #include "llvm/Support/Path.h"
 #include "llvm/Support/TimeProfiler.h"
 #include "llvm/Support/raw_ostream.h"
+
 #include <numeric>
 
 using namespace llvm;

diff  --git a/lld/MachO/Symbols.h b/lld/MachO/Symbols.h
index 0f718e711caef..61300e2902ff2 100644
--- a/lld/MachO/Symbols.h
+++ b/lld/MachO/Symbols.h
@@ -12,8 +12,7 @@
 #include "Config.h"
 #include "InputFiles.h"
 #include "Target.h"
-#include "lld/Common/ErrorHandler.h"
-#include "lld/Common/Strings.h"
+
 #include "llvm/Object/Archive.h"
 #include "llvm/Support/MathExtras.h"
 

diff  --git a/lld/MachO/SyntheticSections.h b/lld/MachO/SyntheticSections.h
index 791581cb8897c..7c8d08a4a52e5 100644
--- a/lld/MachO/SyntheticSections.h
+++ b/lld/MachO/SyntheticSections.h
@@ -22,7 +22,6 @@
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/BinaryFormat/MachO.h"
-#include "llvm/MC/StringTableBuilder.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
 

diff  --git a/lld/MachO/UnwindInfoSection.cpp b/lld/MachO/UnwindInfoSection.cpp
index 610d8793d60ce..1dfa6ecca1f4c 100644
--- a/lld/MachO/UnwindInfoSection.cpp
+++ b/lld/MachO/UnwindInfoSection.cpp
@@ -7,8 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "UnwindInfoSection.h"
-#include "ConcatOutputSection.h"
-#include "Config.h"
 #include "InputSection.h"
 #include "OutputSection.h"
 #include "OutputSegment.h"
@@ -24,6 +22,8 @@
 #include "llvm/BinaryFormat/MachO.h"
 #include "llvm/Support/Parallel.h"
 
+#include "mach-o/compact_unwind_encoding.h"
+
 #include <numeric>
 
 using namespace llvm;

diff  --git a/lld/MachO/UnwindInfoSection.h b/lld/MachO/UnwindInfoSection.h
index 106b1d3a15bea..826573b0c44a0 100644
--- a/lld/MachO/UnwindInfoSection.h
+++ b/lld/MachO/UnwindInfoSection.h
@@ -13,8 +13,6 @@
 #include "SyntheticSections.h"
 #include "llvm/ADT/MapVector.h"
 
-#include "mach-o/compact_unwind_encoding.h"
-
 namespace lld::macho {
 
 class UnwindInfoSection : public SyntheticSection {

diff  --git a/lld/MachO/Writer.cpp b/lld/MachO/Writer.cpp
index 259d4d4ebfdf0..d3fa1e9b23638 100644
--- a/lld/MachO/Writer.cpp
+++ b/lld/MachO/Writer.cpp
@@ -20,14 +20,12 @@
 #include "SyntheticSections.h"
 #include "Target.h"
 #include "UnwindInfoSection.h"
-#include "llvm/Support/Parallel.h"
 
 #include "lld/Common/Arrays.h"
 #include "lld/Common/CommonLinkerContext.h"
 #include "llvm/BinaryFormat/MachO.h"
 #include "llvm/Config/llvm-config.h"
 #include "llvm/Support/LEB128.h"
-#include "llvm/Support/MathExtras.h"
 #include "llvm/Support/Parallel.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/ThreadPool.h"


        


More information about the llvm-commits mailing list