[clang] [CIR] Implement cleanup for array delete with throwing dtor (PR #194965)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 09:26:34 PDT 2026
================
@@ -3924,23 +3924,38 @@ def CIR_DeleteArrayOp : CIR_Op<"delete_array"> {
The `delete_fn` attribute specifies the operator delete function to call.
The `delete_params` attribute describes the parameters needed by the
operator delete call.
+
The `element_dtor` attribute, when present, specifies the destructor to call
on each array element before deallocation.
+
+ The `dtor_may_throw` unit attribute, when present, indicates that the
+ element destructor is may throw exceptions.
}];
let arguments = (ins
CIR_PointerType:$address,
FlatSymbolRefAttr:$delete_fn,
CIR_UsualDeleteParamsAttr:$delete_params,
- OptionalAttr<FlatSymbolRefAttr>:$element_dtor
+ OptionalAttr<FlatSymbolRefAttr>:$element_dtor,
+ UnitAttr:$dtor_may_throw
----------------
xlauko wrote:
Maybe `UnitProp`
https://github.com/llvm/llvm-project/pull/194965
More information about the cfe-commits
mailing list