[PATCH] D75636: [LLD][NFC] Remove getOffsetInFile() workaround.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 01:09:01 PST 2020
grimar accepted this revision.
grimar added a comment.
Nice! LGTM with a nit.
================
Comment at: lld/ELF/SyntheticSections.cpp:2696
auto *isec = cast<InputSection>(s);
- uint64_t offset = isec->getOffsetInFile();
- ret.push_back({isec, r.LowPC - offset, r.HighPC - offset, cuIdx});
+ ret.push_back({isec, r.LowPC, r.HighPC, cuIdx});
}
----------------
This now seems can be:
```
// Range list with zero size has no effect.
InputSectionBase *s = sections[r.SectionIndex];
if (s && s != &InputSection::discarded && s->isLive())
if (r.LowPC != r.HighPC)
ret.push_back({cast<InputSection>(s), r.LowPC, r.HighPC, cuIdx});
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75636/new/
https://reviews.llvm.org/D75636
More information about the llvm-commits
mailing list