[all-commits] [llvm/llvm-project] cd0f77: [CIR] Handle irregular partial init destroy (#192158)

Andy Kaylor via All-commits all-commits at lists.llvm.org
Wed Apr 15 09:12:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd0f775fbc9075897475e4b4cdf56be4a7148d43
      https://github.com/llvm/llvm-project/commit/cd0f775fbc9075897475e4b4cdf56be4a7148d43
  Author: Andy Kaylor <akaylor at nvidia.com>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenDecl.cpp
    M clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp
    M clang/lib/CIR/CodeGen/CIRGenFunction.h
    M clang/test/CIR/CodeGen/partial-array-cleanup.cpp

  Log Message:
  -----------
  [CIR] Handle irregular partial init destroy (#192158)

This implements CIR handling for the case where an array of a destructed
type is being initialized using an initializer list and therefore the
address of the last successfully constructed element must be loaded from
a temporary variable before the partial array destroy loop can begin.

In classic codegen this shares its implementation with the general array
ctor/dtor handling, but in CIR we have dedicated operations to abstract
array ctors/dtors, so the implementation of the irregular partial
destruction happens in a different place in codegen.

Assisted-by: Cursor / claude-4.6-opus-high



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