[all-commits] [llvm/llvm-project] 365851: [CIR] Fix a problem with cleanup active flag initi...

Andy Kaylor via All-commits all-commits at lists.llvm.org
Tue Sep 22 13:46:29 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 365851e9fe1b8723a0282e3849470cd7cbbe38d6
      https://github.com/llvm/llvm-project/commit/365851e9fe1b8723a0282e3849470cd7cbbe38d6
  Author: Andy Kaylor <akaylor at nvidia.com>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenCleanup.cpp
    M clang/lib/CIR/CodeGen/CIRGenExpr.cpp
    M clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp
    M clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
    M clang/lib/CIR/CodeGen/CIRGenFunction.h
    M clang/test/CIR/CodeGen/cleanup-conditional-eh.cpp
    M clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper-eh.cpp
    M clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper.cpp
    M clang/test/CIR/CodeGen/cleanup-conditional.cpp

  Log Message:
  -----------
  [CIR] Fix a problem with cleanup active flag initialization (#225507)

While working on another problem related to conditional cleanups, I came
across a problem with the way CIR was initializing the cleanup active
flag. We were often clearing the flag below the body of a conditional
cleanup region that the flag was meant to guard. As a result, we would
sometimes skip a conditional cleanup becuase the body of the cleanup
region set the active flag to true, but then we cleared the flag
unconditionally before control flow reached the cleanup.

This change fixes that problem and aligns the active flag initialization
placement with classic codegen.

Assisted-by: Cursor / various models



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