Skip to content

Commit 4ad3c21

Browse files
committed
Simplify and optimize .debug_names and removed dead TU code
1 parent cded566 commit 4ad3c21

18 files changed

+988
-1207
lines changed

lld/ELF/DWARF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ template <class ELFT> LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *obj) {
4040
.Case(".debug_gnu_pubtypes", &gnuPubtypesSection)
4141
.Case(".debug_line", &lineSection)
4242
.Case(".debug_loclists", &loclistsSection)
43-
.Case(".debug_names", &debugNamesSection)
43+
.Case(".debug_names", &namesSection)
4444
.Case(".debug_ranges", &rangesSection)
4545
.Case(".debug_rnglists", &rnglistsSection)
4646
.Case(".debug_str_offsets", &strOffsetsSection)

lld/ELF/DWARF.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ template <class ELFT> class LLDDwarfObj final : public llvm::DWARFObject {
6969
}
7070

7171
const LLDDWARFSection &getNamesSection() const override {
72-
return debugNamesSection;
72+
return namesSection;
7373
}
7474

7575
StringRef getFileName() const override { return ""; }
@@ -94,12 +94,12 @@ template <class ELFT> class LLDDwarfObj final : public llvm::DWARFObject {
9494
LLDDWARFSection gnuPubtypesSection;
9595
LLDDWARFSection infoSection;
9696
LLDDWARFSection loclistsSection;
97+
LLDDWARFSection namesSection;
9798
LLDDWARFSection rangesSection;
9899
LLDDWARFSection rnglistsSection;
99100
LLDDWARFSection strOffsetsSection;
100101
LLDDWARFSection lineSection;
101102
LLDDWARFSection addrSection;
102-
LLDDWARFSection debugNamesSection;
103103
StringRef abbrevSection;
104104
StringRef strSection;
105105
StringRef lineStrSection;

0 commit comments

Comments
 (0)