[PATCH] D61255: [ThinLTO] Make weak data symbols prevailing when they're visible to regular object

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 11:22:20 PDT 2019


steven_wu added a comment.

I don't see this happening in legacy thinLTO code generator but I need to do more digging to see what is the difference. For legacy API, the static variable is not internalized or turned into available_externally.

I agree this doesn't look like the correct fix, especially the check `!Sym.isExecutable()` which doesn't look correct to me. CompileTimeConstant also sounds weird because it is not something used in the linker semantics. Maybe using ReadOnly bits in summary or UnnamedAddr bits in resolution is a better approach but I am not sure if that is correct in all places. There is also a bit in GlobalResolution `VisibleOutsideSummary` which sounds like is designed to solve this problem?


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

https://reviews.llvm.org/D61255





More information about the llvm-commits mailing list