[all-commits] [llvm/llvm-project] 35dcb5: [CIR] Add EH handling for lifetime extended cleanu...

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


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 35dcb5c1303b251d8728bd4f8ed93ff4316eea3a
      https://github.com/llvm/llvm-project/commit/35dcb5c1303b251d8728bd4f8ed93ff4316eea3a
  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
    A clang/test/CIR/CodeGen/cleanup-automatic-eh.cpp

  Log Message:
  -----------
  [CIR] Add EH handling for lifetime extended cleanups (#192305)

This adds code to call pushDestroyAndDeferDeactivation from the
pushLifetimeExtendedDestroy function. This was needed to generate the
correct code for lifetime extended cleanups when exceptions are enabled.
An extended version of the cleanup with automatic storage duration is
used as a test case.

To make this work correctly, I had to add a CleanupDeactivationScope to
RunCleanupsScope and force deactivation when forceCleanup is called.
This matches the corresponding code in classic codegen.

I surveyed other places where classic codegen is using
CleanupDeactivationScope and added a MissingFeatures marker in one
location where it was not previously marked. Other places where it was
missing were already marked in this way.



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