diff options
author | Fangrui Song <i@maskray.me> | 2024-04-09 14:13:45 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-04-09 14:13:45 -0700 |
commit | 4afcfd7498363e42c002ee33a6e925c2d2c7b45e (patch) | |
tree | 2b0b34e141cab820d720b195769ca94321fb24e1 | |
parent | a332cfc986e431de11cdbf632b5769878e0d826b (diff) | |
download | llvm-4afcfd7498363e42c002ee33a6e925c2d2c7b45e.zip llvm-4afcfd7498363e42c002ee33a6e925c2d2c7b45e.tar.gz llvm-4afcfd7498363e42c002ee33a6e925c2d2c7b45e.tar.bz2 |
[ELF] Sort DWARF.h sections. NFC
to make it clear whether .debug_names should be added.
And include llvm/ADT/STLFunctionalExtras.h for IWYU.
-rw-r--r-- | lld/ELF/DWARF.h | 25 | ||||
-rw-r--r-- | lld/ELF/SyntheticSections.h | 1 |
2 files changed, 11 insertions, 15 deletions
diff --git a/lld/ELF/DWARF.h b/lld/ELF/DWARF.h index d568952..ada38a0 100644 --- a/lld/ELF/DWARF.h +++ b/lld/ELF/DWARF.h @@ -11,6 +11,7 @@ #include "InputFiles.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/STLFunctionalExtras.h" #include "llvm/DebugInfo/DWARF/DWARFContext.h" #include "llvm/Object/ELF.h" #include <optional> @@ -36,34 +37,28 @@ public: return cast<InputSection>(infoSection.sec); } + const llvm::DWARFSection &getAddrSection() const override { + return addrSection; + } + const llvm::DWARFSection &getLineSection() const override { + return lineSection; + } const llvm::DWARFSection &getLoclistsSection() const override { return loclistsSection; } - const llvm::DWARFSection &getRangesSection() const override { return rangesSection; } - const llvm::DWARFSection &getRnglistsSection() const override { return rnglistsSection; } - const llvm::DWARFSection &getStrOffsetsSection() const override { return strOffsetsSection; } - const llvm::DWARFSection &getLineSection() const override { - return lineSection; - } - - const llvm::DWARFSection &getAddrSection() const override { - return addrSection; - } - const LLDDWARFSection &getGnuPubnamesSection() const override { return gnuPubnamesSection; } - const LLDDWARFSection &getGnuPubtypesSection() const override { return gnuPubtypesSection; } @@ -86,18 +81,18 @@ private: uint64_t pos, ArrayRef<RelTy> rels) const; + LLDDWARFSection addrSection; LLDDWARFSection gnuPubnamesSection; LLDDWARFSection gnuPubtypesSection; LLDDWARFSection infoSection; + LLDDWARFSection lineSection; LLDDWARFSection loclistsSection; LLDDWARFSection rangesSection; LLDDWARFSection rnglistsSection; LLDDWARFSection strOffsetsSection; - LLDDWARFSection lineSection; - LLDDWARFSection addrSection; StringRef abbrevSection; - StringRef strSection; StringRef lineStrSection; + StringRef strSection; }; } // namespace lld::elf diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index 02a669b..7490fb6 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -25,6 +25,7 @@ #include "Symbols.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/MapVector.h" +#include "llvm/ADT/STLFunctionalExtras.h" #include "llvm/BinaryFormat/ELF.h" #include "llvm/MC/StringTableBuilder.h" #include "llvm/Support/Compiler.h" |