@@ -81,27 +81,20 @@ class AbbrevSetWriter;
81
81
// / debug info.
82
82
class InMemoryCASDWARFObject : public DWARFObject {
83
83
ArrayRef<char > DebugAbbrevSection;
84
- DWARFSection DebugStringOffsetsSection;
85
84
bool IsLittleEndian;
86
85
uint8_t AddressSize;
87
86
88
87
public:
89
- InMemoryCASDWARFObject (ArrayRef<char > AbbrevContents,
90
- ArrayRef<char > StringOffsetsContents,
91
- bool IsLittleEndian, uint8_t AddressSize)
92
- : DebugAbbrevSection(AbbrevContents),
93
- DebugStringOffsetsSection ({toStringRef (StringOffsetsContents)}),
94
- IsLittleEndian(IsLittleEndian), AddressSize(AddressSize) {}
88
+ InMemoryCASDWARFObject (ArrayRef<char > AbbrevContents, bool IsLittleEndian,
89
+ uint8_t AddressSize)
90
+ : DebugAbbrevSection(AbbrevContents), IsLittleEndian(IsLittleEndian),
91
+ AddressSize (AddressSize) {}
95
92
bool isLittleEndian () const override { return IsLittleEndian; }
96
93
97
94
StringRef getAbbrevSection () const override {
98
95
return toStringRef (DebugAbbrevSection);
99
96
}
100
97
101
- const DWARFSection &getStrOffsetsSection () const override {
102
- return DebugStringOffsetsSection;
103
- }
104
-
105
98
std::optional<RelocAddrEntry> find (const DWARFSection &Sec,
106
99
uint64_t Pos) const override {
107
100
return {};
@@ -2157,7 +2150,7 @@ Expected<SmallVector<char, 0>>
2157
2150
MCCASBuilder::mergeMCFragmentContents (const MCSection *Section,
2158
2151
bool IsDebugLineSection) {
2159
2152
SmallVector<char , 0 > mergedData;
2160
- if (!Section-> curFragList () )
2153
+ if (!Section)
2161
2154
return mergedData;
2162
2155
for (const MCFragment &Fragment : *Section) {
2163
2156
if (Fragment.getKind () == MCFragment::FT_Dwarf) {
@@ -2441,15 +2434,7 @@ Error MCCASBuilder::splitDebugInfoAndAbbrevSections() {
2441
2434
if (!FullAbbrevData)
2442
2435
return FullAbbrevData.takeError ();
2443
2436
2444
- const MCSection *StringOffsetsFragmentList = DwarfSections.StrOffsets ;
2445
-
2446
- Expected<SmallVector<char , 0 >> FullStringOffsetsData =
2447
- mergeMCFragmentContents (StringOffsetsFragmentList);
2448
-
2449
- if (!FullStringOffsetsData)
2450
- return FullStringOffsetsData.takeError ();
2451
-
2452
- InMemoryCASDWARFObject CASObj (*FullAbbrevData, *FullStringOffsetsData,
2437
+ InMemoryCASDWARFObject CASObj (*FullAbbrevData,
2453
2438
Asm.getBackend ().Endian == endianness::little,
2454
2439
ObjectWriter.getAddressSize ());
2455
2440
auto DWARFObj = std::make_unique<InMemoryCASDWARFObject>(CASObj);
0 commit comments