[PATCH] D91583: [LTO] Prevent devirtualization for symbols dynamically exported
Nathan Lanza via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 7 22:17:48 PST 2021
lanza added a comment.
I'm not sure this change is working correctly -- either that or my builds are messed up.
- `BitcodeCompiler::add` builds the resolutions for a bitcode module's symbols
- For all symbols in the module `r.ExportDynamic` is set via `isExportDynamic`:
static bool isExportDynamic(Kind k, uint8_t visibility) {
if (k == SharedKind)
return visibility == llvm::ELF::STV_DEFAULT;
return config->shared || config->exportDynamic;
}
This static member function is used to determine wether a is always coming back `true` since the symbols in a `BitcodeFile` aren't `SharedKind` and `config->shared` is obviously true for a shared object.
Every symbol with a `GlobalResolution` is being put into the `DynamicExportSymbols` list and thus nothing is getting the `vcall_visibility` metadata.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91583/new/
https://reviews.llvm.org/D91583
More information about the llvm-commits
mailing list