11
11
12
12
#include " InputFiles.h"
13
13
#include " llvm/ADT/STLExtras.h"
14
+ #include " llvm/ADT/STLFunctionalExtras.h"
14
15
#include " llvm/DebugInfo/DWARF/DWARFContext.h"
15
16
#include " llvm/Object/ELF.h"
16
17
#include < optional>
@@ -36,34 +37,28 @@ template <class ELFT> class LLDDwarfObj final : public llvm::DWARFObject {
36
37
return cast<InputSection>(infoSection.sec );
37
38
}
38
39
40
+ const llvm::DWARFSection &getAddrSection () const override {
41
+ return addrSection;
42
+ }
43
+ const llvm::DWARFSection &getLineSection () const override {
44
+ return lineSection;
45
+ }
39
46
const llvm::DWARFSection &getLoclistsSection () const override {
40
47
return loclistsSection;
41
48
}
42
-
43
49
const llvm::DWARFSection &getRangesSection () const override {
44
50
return rangesSection;
45
51
}
46
-
47
52
const llvm::DWARFSection &getRnglistsSection () const override {
48
53
return rnglistsSection;
49
54
}
50
-
51
55
const llvm::DWARFSection &getStrOffsetsSection () const override {
52
56
return strOffsetsSection;
53
57
}
54
58
55
- const llvm::DWARFSection &getLineSection () const override {
56
- return lineSection;
57
- }
58
-
59
- const llvm::DWARFSection &getAddrSection () const override {
60
- return addrSection;
61
- }
62
-
63
59
const LLDDWARFSection &getGnuPubnamesSection () const override {
64
60
return gnuPubnamesSection;
65
61
}
66
-
67
62
const LLDDWARFSection &getGnuPubtypesSection () const override {
68
63
return gnuPubtypesSection;
69
64
}
@@ -86,18 +81,18 @@ template <class ELFT> class LLDDwarfObj final : public llvm::DWARFObject {
86
81
uint64_t pos,
87
82
ArrayRef<RelTy> rels) const ;
88
83
84
+ LLDDWARFSection addrSection;
89
85
LLDDWARFSection gnuPubnamesSection;
90
86
LLDDWARFSection gnuPubtypesSection;
91
87
LLDDWARFSection infoSection;
88
+ LLDDWARFSection lineSection;
92
89
LLDDWARFSection loclistsSection;
93
90
LLDDWARFSection rangesSection;
94
91
LLDDWARFSection rnglistsSection;
95
92
LLDDWARFSection strOffsetsSection;
96
- LLDDWARFSection lineSection;
97
- LLDDWARFSection addrSection;
98
93
StringRef abbrevSection;
99
- StringRef strSection;
100
94
StringRef lineStrSection;
95
+ StringRef strSection;
101
96
};
102
97
103
98
} // namespace lld::elf
0 commit comments