[PATCH] D98220: [WPD][ELF] Allow whole program devirtualization for version script localized symbols

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 09:00:46 PST 2021


tejohnson added a comment.

In D98220#2613098 <https://reviews.llvm.org/D98220#2613098>, @lanza wrote:

>> Well right now they are marked with public visibility, which is the same thing as not having any vcall_visibility. Since they are marked in the IR as having hidden visibility, clang presumably should have marked them with a more restricted vcall_visibility (linkage unit level).
>
> Hmm? You first said "they are marked with public visibility" and then said "they are marked in the IR as having hidden visibility." I don't follow. A `__attribute__(visibility("hidden")))` symbol gets the `hidden` attr.

An older version of the patch had the vtables marked "hidden" in the LLVM assembly. My point was that clang would have given them a non-public vcall_visibility in that case. The patch and the test case have changed though, so that now the local binding comes from the linker version script and not the input IR, which is more consistent with the case I believe you are trying to handle?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98220



More information about the llvm-commits mailing list