File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -270,16 +270,14 @@ class DWARF5AccelTableData : public AccelTableData {
270
270
#endif
271
271
272
272
uint64_t getDieOffset () const {
273
- assert (std::holds_alternative<uint64_t >(OffsetVal) &&
274
- " Accessing DIE Offset before normalizing." );
273
+ assert (isNormalized () && " Accessing DIE Offset before normalizing." );
275
274
return std::get<uint64_t >(OffsetVal);
276
275
}
277
276
unsigned getDieTag () const { return DieTag; }
278
277
unsigned getUnitID () const { return UnitID; }
279
278
bool isTU () const { return IsTU; }
280
279
void normalizeDIEToOffset () {
281
- assert (std::holds_alternative<const DIE *>(OffsetVal) &&
282
- " Accessing offset after normalizing." );
280
+ assert (!isNormalized () && " Accessing offset after normalizing." );
283
281
OffsetVal = std::get<const DIE *>(OffsetVal)->getOffset ();
284
282
}
285
283
bool isNormalized () const {
@@ -309,7 +307,7 @@ class DWARF5AccelTable : public AccelTable<DWARF5AccelTableData> {
309
307
public:
310
308
struct UnitIndexAndEncoding {
311
309
unsigned Index;
312
- DWARF5AccelTableData::AttributeEncoding Endoding ;
310
+ DWARF5AccelTableData::AttributeEncoding Encoding ;
313
311
};
314
312
// / Returns type units that were constructed.
315
313
const TUVectorTy &getTypeUnitsSymbols () { return TUSymbolsOrHashes; }
Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ static uint32_t constructAbbreviationTag(
412
412
const std::optional<DWARF5AccelTable::UnitIndexAndEncoding> &EntryRet) {
413
413
uint32_t AbbrvTag = 0 ;
414
414
if (EntryRet)
415
- AbbrvTag |= 1 << EntryRet->Endoding .Index ;
415
+ AbbrvTag |= 1 << EntryRet->Encoding .Index ;
416
416
AbbrvTag |= 1 << dwarf::DW_IDX_die_offset;
417
417
AbbrvTag |= Tag << LowerBitSize;
418
418
return AbbrvTag;
@@ -429,7 +429,7 @@ void Dwarf5AccelTableWriter<DataT>::populateAbbrevsMap() {
429
429
if (Abbreviations.count (AbbrvTag) == 0 ) {
430
430
SmallVector<DWARF5AccelTableData::AttributeEncoding, 2 > UA;
431
431
if (EntryRet)
432
- UA.push_back (EntryRet->Endoding );
432
+ UA.push_back (EntryRet->Encoding );
433
433
UA.push_back ({dwarf::DW_IDX_die_offset, dwarf::DW_FORM_ref4});
434
434
Abbreviations.try_emplace (AbbrvTag, UA);
435
435
}
You can’t perform that action at this time.
0 commit comments