From: Vy Nguyen Date: Wed, 19 Oct 2022 16:45:49 +0000 (-0400) Subject: [lld-macho][nfc] Clean up includes X-Git-Tag: upstream/17.0.6~30099 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc7a71890d80a8d556dfee4555872916895ec663;p=platform%2Fupstream%2Fllvm.git [lld-macho][nfc] Clean up includes - remove unused/duplicate includes - reformatting/whitespaces Differential Revision: https://reviews.llvm.org/D136266 --- diff --git a/lld/MachO/InputSection.cpp b/lld/MachO/InputSection.cpp index f9a3a6f..1ef7ae5 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 1f0a9ba..d89b080 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 2ad85c6..a37213d 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 fbc129c..d484c40 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 fbc7796..e5b9829 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 using namespace llvm; diff --git a/lld/MachO/Symbols.h b/lld/MachO/Symbols.h index 0f718e7..61300e2 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 791581c..7c8d08a 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 610d879..1dfa6ec 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 using namespace llvm; diff --git a/lld/MachO/UnwindInfoSection.h b/lld/MachO/UnwindInfoSection.h index 106b1d3..826573b 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 259d4d4..d3fa1e9 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"