[PATCH] D110040: [lld-macho] Don't replace local personality symbol with LazySymbol

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 19 09:13:15 PDT 2021


oontvoo created this revision.
oontvoo added a reviewer: int3.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
Herald added a reviewer: lld-macho.
oontvoo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Follup-up to D107533 <https://reviews.llvm.org/D107533>, where we replaced local syms with non-local.
It doesn't make sense to replace local replace local symbol with lazy.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110040

Files:
  lld/MachO/UnwindInfoSection.cpp


Index: lld/MachO/UnwindInfoSection.cpp
===================================================================
--- lld/MachO/UnwindInfoSection.cpp
+++ lld/MachO/UnwindInfoSection.cpp
@@ -195,7 +195,8 @@
         // (See discussions/alternatives already considered on D107533)
         if (!defined->isExternal())
           if (const Symbol *sym = symtab->find(defined->getName()))
-            r.referent = s = const_cast<Symbol *>(sym);
+            if (sym->kind() != Symbol::LazyKind)
+              r.referent = s = const_cast<Symbol *>(sym);
       }
       if (auto *undefined = dyn_cast<Undefined>(s)) {
         treatUndefinedSymbol(*undefined);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110040.373466.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210919/5d9db2f4/attachment.bin>


More information about the llvm-commits mailing list