Skip to content

Commit cee8c29

Browse files
committed
[lld][ELF] Fixes to previous fixes.
Fix typo, add 'const', replace one use of 'seq'/
1 parent fe196b7 commit cee8c29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lld/ELF/SyntheticSections.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3077,9 +3077,9 @@ std::pair<uint32_t, uint32_t> DebugNamesBaseSection::computeEntryPool(
30773077
// Abbrevs are indexed starting at 1; vector starts at 0. (abbrevCode
30783078
// corresponds to position in the merged table vector).
30793079
const Abbrev *abbrev = abbrevTable[ie.abbrevCode - 1];
3080-
for (auto &[a, v] : zip_equal(abbrev->attributes, ie.attrValues))
3080+
for (const auto &[a, v] : zip_equal(abbrev->attributes, ie.attrValues))
30813081
if (a.Index == DW_IDX_parent && a.Form == DW_FORM_ref4)
3082-
v.attrValue = ie.parentEntry->poolOfset;
3082+
v.attrValue = ie.parentEntry->poolOffset;
30833083
}
30843084
}
30853085
});
@@ -3230,8 +3230,8 @@ template <class ELFT> void DebugNamesSection<ELFT>::writeTo(uint8_t *buf) {
32303230
buf += hdr.AugmentationStringSize;
32313231

32323232
// Write the CU list.
3233-
for (OutputChunk &chunk : chunks)
3234-
for (uint32_t cuOffset : chunk.compUnits)
3233+
for (auto i : seq(numChunks))
3234+
for (uint32_t cuOffset : chunks[i].compUnits)
32353235
endian::writeNext<uint32_t, ELFT::Endianness>(buf, cuOffset);
32363236

32373237
// Write the local TU list, then the foreign TU list..

0 commit comments

Comments
 (0)