[PATCH] D108924: [lld/mac] Tweak estimateStubsInRangeVA a bit
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 30 10:08:51 PDT 2021
oontvoo accepted this revision.
oontvoo added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lld/MachO/ConcatOutputSection.cpp:173-176
+ for (size_t i = callIdx; i < inputs.size(); i++) {
InputSection *isec = inputs[i];
isecEnd = alignTo(isecEnd, isec->align) + isec->getSize();
}
----------------
I must be missing something here but why does this need to be a loop and not simply
```
if (callIdx < inputs.size()) {
InputSection *isec = inputs.last();
secEnd = alignTo(isecEnd, isec->align) + isec->getSize();
}
```
IOWs, isecEnd seems to get overridden in each iteration, yes?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108924/new/
https://reviews.llvm.org/D108924
More information about the llvm-commits
mailing list