================
@@ -649,6 +649,41 @@ void CIRGenFunction::emitNullabilityCheck(LValue lhs,
mlir::Value rhs,
assert(!cir::MissingFeatures::sanitizers());
}
+/// Destroys all the elements of the given array, beginning from last to first.
+/// The array cannot be zero-length.
+///
+/// \param begin - a type* denoting the first element of the array
+/// \param end - a type* denoting one past the end of the array
+/// \param elementType - the element type of the array
+/// \param destroyer - the function to call to destroy elements
+void CIRGenFunction::emitArrayDestroy(mlir::Value begin, mlir::Value end,
+ QualType elementType,
+ CharUnits elementAlign,
+ Destroyer *destroyer,
+ bool checkZeroLength) {
+ assert(!elementType->isArrayType());
+ if (checkZeroLength)
+ cgm.errorNYI("emitArrayDestroy: check for zero length");
----------------
andykaylor wrote:
You're right, though that means we will need to check for that condition in
LowerPrepare when we implement support for VLAs.
https://github.com/llvm/llvm-project/pull/150499
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits