[lld-macho] Stop crash when emitting personalities with -dead_strip
authorAlex Brachet <abrachet@google.com>
Fri, 20 May 2022 21:39:16 +0000 (21:39 +0000)
committerAlex Brachet <abrachet@google.com>
Fri, 20 May 2022 21:40:47 +0000 (21:40 +0000)
commit190b0f42cf559af7299c53ff010b55bc9b4f5f8c
tree7e7e72208658664b00c74ceefecdbf01584f7f5f
parentd390035b46907f1c421d312bdd33f44ad7580415
[lld-macho] Stop crash when emitting personalities with -dead_strip

The <internal> symbol was tripping an assertion in getVA() because it
was not marked as used. Per the comment above that symbols creation,
dead stripping has already occurred so marking this symbol as used is
accurate.

Fixes https://github.com/llvm/llvm-project/issues/55565

Differential revision: https://reviews.llvm.org/D126072
lld/MachO/UnwindInfoSection.cpp
lld/test/MachO/weak-definition-gc.s