[PATCH] D98220: [WPD][ELF] Allow whole program devirtualization for hidden/internal symbols
Nathan Lanza via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 8 15:45:07 PST 2021
lanza added inline comments.
================
Comment at: lld/test/ELF/lto/devirt_vcall_vis_hidden.ll:25
+ at _ZTV1A = available_externally hidden unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* undef, i8* bitcast (i32 (%struct.A*, i32)* @_ZN1A1fEi to i8*), i8* bitcast (i32 (%struct.A*, i32)* @_ZN1A1nEi to i8*)] }, !type !0, !vcall_visibility !2
+ at _ZTV1B = linkonce_odr hidden unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* undef, i8* bitcast (i32 (%struct.B*, i32)* @_ZN1B1fEi to i8*), i8* bitcast (i32 (%struct.A*, i32)* @_ZN1A1nEi to i8*)] }, !type !0, !type !1, !vcall_visibility !2
+
----------------
tejohnson wrote:
> These hidden symbols should start out with Linkage Unit LTO visibility (CodeGenModule::GetVCallVisibilityLevel)
Yea, this shouldn't have `!vcall_visibility`. A version script could be used here to say that `_ZTV1B` is global but `_ZTV1A` is local.
```
{
global:
_ZTV1B;
local:
*;
};
```
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