Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Address Feedback nr.1

Co-authored-by: Ellis Hoag <ellis.sparky.hoag@gmail.com>
  • Loading branch information
alx32 and ellishg committed May 3, 2024
1 parent 778c11c commit 248eb26
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lld/MachO/ObjC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,8 @@ static StringRef getReferentString(const Reloc &r) {
if (auto *isec = r.referent.dyn_cast<InputSection *>())
return cast<CStringInputSection>(isec)->getStringRefAtOffset(r.addend);
auto *sym = cast<Defined>(r.referent.get<Symbol *>());
if (isa<CStringInputSection>(sym->isec()))
return cast<CStringInputSection>(sym->isec())
->getStringRefAtOffset(sym->value + r.addend);
if (auto *s = dyn_cast_or_null<CStringInputSection>(sym->isec()))
return s->getStringRefAtOffset(sym->value + r.addend);

if (isa<ConcatInputSection>(sym->isec())) {
auto &data = sym->isec()->data;
Expand Down

0 comments on commit 248eb26

Please sign in to comment.