[all-commits] [llvm/llvm-project] b30e26: [CIR] Implement comdat 'name' for dtors (#225929)

Erich Keane via All-commits all-commits at lists.llvm.org
Wed Sep 23 20:31:20 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b30e26d9e0f0f02cdc9563878587a18a745a2cde
      https://github.com/llvm/llvm-project/commit/b30e26d9e0f0f02cdc9563878587a18a745a2cde
  Author: Erich Keane <ekeane at nvidia.com>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M clang/include/clang/CIR/Dialect/IR/CIROps.td
    M clang/include/clang/CIR/Interfaces/CIROpInterfaces.td
    M clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
    M clang/lib/CIR/Dialect/IR/CIRDialect.cpp
    M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
    A clang/test/CIR/CodeGen/dtor-comdat-key.cpp

  Log Message:
  -----------
  [CIR] Implement comdat 'name' for dtors (#225929)

Itanium emits the complete-object ctor/dtor as an alias to the base
object version when they are able to be put into COMDAT. However, this
is not currently implemented in CIR, where we are missing the 'comdat
with a name' functionality.

This patch limits that to ONLY FuncOp, and only does the named version
(instead of referencing its own name) for these ctor/dtors. Doing this
for the comdat attribute and for GlobalOp is left to a future patch.

This showed up in the 'root' project, where the wrong dtor was called as
a result!

Note: Claude helped me with the diagnosis, and wrote the reproducer.



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