aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-12-11 08:55:05 -0800
committerGitHub <noreply@github.com>2024-12-11 08:55:05 -0800
commit53544fc15f08687c14becced4ecc22c2356265cd (patch)
treedaa62135b91e91bc3cd108d49644ab095687c4c5 /llvm/lib/CodeGen/MachineInstr.cpp
parent03661fbe45e70bde2984a5fc0feab6396407a33b (diff)
downloadllvm-53544fc15f08687c14becced4ecc22c2356265cd.zip
llvm-53544fc15f08687c14becced4ecc22c2356265cd.tar.gz
llvm-53544fc15f08687c14becced4ecc22c2356265cd.tar.bz2
[ELF] Respect ltoCanOmit for symbols in non-prevailing COMDAT
A linkonce_odr definition can be omitted in LTO compilation if `canBeOmittedFromSymbolTable()` is true in all bitcode files. Currently, we don't respect the `canBeOmittedFromSymbolTable()` bit from symbols in a non-prevailing COMDAT, which could lead to incorrect omission of a definition when merging a prevailing linkonce_odr and a non-prevailing weak_odr, e.g. an implicit template instantiation and an explicit template instantiation. To fix #111341, allow the non-prevailing COMDAT code path to clear the `ltoCanOmit` bit, so that `VisibleToRegularObj` could be false in LTO.cpp. We could resolve either an Undefined or a Defined. For simplicity, just use a Defined like the prevailing case (similar to how we resolve symbols in ObjectFile COMDAT reviews.llvm.org/D120626). Pull Request: https://github.com/llvm/llvm-project/pull/119332
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions