[PATCH] D141082: [lld] Prevent assertions for aliases to weak_def_can_be_hidden symbols

Paul Kirth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 13:56:03 PST 2023


paulkirth added a comment.

In D141082#4032313 <https://reviews.llvm.org/D141082#4032313>, @int3 wrote:

> Your `sym.n_type & N_INDR` check is not doing what you think it is -- `n_type` is not a set of disjoint flags, but a bunch of overlapping values. `sym.n_type & N_INDR` happens to be true for `n_type == N_SECT`, but that doesn't mean `n_type` is an alias.

Thanks for pointing out the subtlety here. I was definitely under the wrong impression.

> So I think we should just delete the assertion, and keep the test as-is (with an update to the comment)

Sounds good. I'll update the patch with those suggestions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141082/new/

https://reviews.llvm.org/D141082



More information about the llvm-commits mailing list