Skip to content

Commit b77c713

Browse files
authored
[lld][BP] Fix duplicate section size measurment (#145384)
1 parent 3e98d2b commit b77c713

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lld/include/lld/Common/BPSectionOrdererBase.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ auto BPOrderer<D>::computeOrder(
319319
for (auto dupSecIdx : It->getSecond()) {
320320
const auto *dupIsec = sections[dupSecIdx];
321321
if (orderedSections.insert(dupIsec)) {
322-
duplicateCodeSize += D::getSize(*isec);
322+
duplicateCodeSize += D::getSize(*dupIsec);
323323
++numDuplicateCodeSections;
324324
}
325325
}
@@ -337,7 +337,7 @@ auto BPOrderer<D>::computeOrder(
337337
for (auto dupSecIdx : It->getSecond()) {
338338
const auto *dupIsec = sections[dupSecIdx];
339339
if (orderedSections.insert(dupIsec)) {
340-
duplicateDataSize += D::getSize(*isec);
340+
duplicateDataSize += D::getSize(*dupIsec);
341341
++numDuplicateDataSections;
342342
}
343343
}

0 commit comments

Comments
 (0)