[PATCH] D110040: [lld-macho] Don't replace local personality symbol with LazySymbol
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 20 08:45:40 PDT 2021
int3 added a comment.
Can we have a test? It's kind of subtle... we typically don't bother checking for `LazySymbol` because any such referenced symbol would typically by `fetch()`-ed once all the input files are loaded. But in this case we aren't looking up a symbol by relocation, but by name. I think it's worth documenting in a test so that the check doesn't get removed by someone trying to 'clean up' the code in the future.
================
Comment at: lld/MachO/UnwindInfoSection.cpp:199
+ if (sym->kind() != Symbol::LazyKind)
+ r.referent = s = const_cast<Symbol *>(sym);
}
----------------
unrelated to this diff, but doesn't `find()` return a non-`const` pointer? In which case we should just take a non-const value on line 197 and skip the cast here
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110040/new/
https://reviews.llvm.org/D110040
More information about the llvm-commits
mailing list