[all-commits] [llvm/llvm-project] 0371df: [CodeGen] Make non-COMDAT relative vtable internal...
Shoaib Meenai via All-commits
all-commits at lists.llvm.org
Tue Aug 6 12:58:27 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0371dff99529e93b8650281801e89bc015dc2703
https://github.com/llvm/llvm-project/commit/0371dff99529e93b8650281801e89bc015dc2703
Author: Shoaib Meenai <smeenai at fb.com>
Date: 2024-08-06 (Tue, 06 Aug 2024)
Changed paths:
M clang/lib/CodeGen/CGVTables.cpp
M clang/test/CodeGenCXX/OmitRTTIComponentABI/simple-vtable-definition.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-parent-in-comdat.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-1.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-2.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/diamond-inheritance.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/diamond-virtual-inheritance.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/inheritted-virtual-function.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/inline-virtual-function.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/multiple-inheritance.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/no-alias-when-dso-local.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/override-pure-virtual-method.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/overriden-virtual-function.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-flag.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-hwasan.cpp
M clang/test/CodeGenCXX/RelativeVTablesABI/simple-vtable-definition.cpp
Log Message:
-----------
[CodeGen] Make non-COMDAT relative vtable internal instead of private (#102056)
When using the relative vtable ABI, if a vtable is not dso_local, it's
given private linkage (if not COMDAT) or hidden visibility (if COMDAT)
to make it dso_local (to place it in rodata instead of data.rel.ro), and
an alias generated with the original linkage and visibility. This alias
could later be removed from the symbol table, e.g. if using a version
script, at which point we lose all symbol information about the vtable.
Use internal linkage instead of private linkage to avoid this.
While I'm here, clarify the comment about why COMDAT vtables can't use
internal (or private) linkage, and associate it with the else block
where hidden visibility is applied instead of internal linkage.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list