[all-commits] [llvm/llvm-project] 75db4c: Restore unnamed_addr on vtables in -fno-rtti build...

Hans Wennborg via All-commits all-commits at lists.llvm.org
Fri Jun 5 13:34:24 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 75db4ce2177b37a2ae94fdbb9cee076dde5080df
      https://github.com/llvm/llvm-project/commit/75db4ce2177b37a2ae94fdbb9cee076dde5080df
  Author: Hans Wennborg <hans at hanshq.net>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M clang/lib/CodeGen/CGVTables.cpp
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/CodeGen/MicrosoftCXXABI.cpp
    M clang/test/CodeGenCUDA/increment-index-for-thunks.cu
    M clang/test/CodeGenCUDA/record-layout.cu
    M clang/test/CodeGenCXX/OmitRTTIComponentABI/simple-vtable-definition.cpp
    M clang/test/CodeGenCXX/apple-kext-indirect-virtual-dtor-call.cpp
    M clang/test/CodeGenCXX/dllimport.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vftables.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
    M clang/test/CodeGenCXX/ptrauth-apple-kext-indirect-call-2.cpp
    M clang/test/CodeGenCXX/ptrauth-apple-kext-indirect-virtual-dtor-call.cpp
    M clang/test/CodeGenCXX/ptrauth-global-constant-initializers.cpp
    M clang/test/Headers/hip-header.hip
    M clang/test/OpenMP/nvptx_target_pure_deleted_codegen.cpp
    M clang/test/OpenMP/target_vtable_codegen_explicit.cpp

  Log Message:
  -----------
  Restore unnamed_addr on vtables in -fno-rtti builds (#201846)

This is a follow-up to #200108 which dropped unnamed_addr from vtables
since it can break dynamic_cast under some circumstances. However, that
caused significant binary size regressions due to preventing ICF of
vtables.

This patch restores unnamed_addr on vtables in -fno-rtti builds, since
those do not support dynamic_cast, recovering the binary size savings at
least for those using that configuration.



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