diff --git a/clang/include/clang/CIR/Dialect/IR/CIROps.td b/clang/include/clang/CIR/Dialect/IR/CIROps.td index 61ce3db06f5e..94ae7117f15e 100644 --- a/clang/include/clang/CIR/Dialect/IR/CIROps.td +++ b/clang/include/clang/CIR/Dialect/IR/CIROps.td @@ -5312,8 +5312,10 @@ def ClearCacheOp : CIR_Op<"clear_cache", [AllTypesMatch<["begin", "end"]>]> { //===----------------------------------------------------------------------===// class CIR_ArrayInitDestroy : CIR_Op { - let arguments = (ins Arg:$addr); + let arguments = (ins + Arg:$addr + ); + let regions = (region SizedRegion<1>:$body); let assemblyFormat = [{ `(` $addr `:` qualified(type($addr)) `)` $body attr-dict diff --git a/clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td b/clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td index 7e146470f816..125df316211c 100644 --- a/clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td +++ b/clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td @@ -175,6 +175,12 @@ def CIR_AnyRecordType : CIR_TypeBase<"::cir::RecordType", "record type">; def CIR_AnyFuncType : CIR_TypeBase<"::cir::FuncType", "function type">; +//===----------------------------------------------------------------------===// +// Array Type predicates +//===----------------------------------------------------------------------===// + +def CIR_AnyArrayType : CIR_TypeBase<"::cir::ArrayType", "array type">; + //===----------------------------------------------------------------------===// // Pointer Type predicates //===----------------------------------------------------------------------===// @@ -230,4 +236,6 @@ def CIR_PtrToRecordType : CIR_PtrToType; def CIR_PtrToFunc : CIR_PtrToType; +def CIR_PtrToArray : CIR_PtrToType; + #endif // CLANG_CIR_DIALECT_IR_CIRTYPECONSTRAINTS_TD diff --git a/clang/include/clang/CIR/Dialect/IR/CIRTypes.td b/clang/include/clang/CIR/Dialect/IR/CIRTypes.td index bfb6254e3bc4..b76f29b3c2c3 100644 --- a/clang/include/clang/CIR/Dialect/IR/CIRTypes.td +++ b/clang/include/clang/CIR/Dialect/IR/CIRTypes.td @@ -559,15 +559,6 @@ def CIR_AnySignedIntOrVecOfSignedInt: AnyTypeOf<[ def CIR_AnyFloatOrVecOfFloat: AnyTypeOf<[CIR_AnyFloatType, FPVector]>; -// Pointer to Arrays -def ArrayPtr : Type< - And<[ - CPred<"::mlir::isa<::cir::PointerType>($_self)">, - CPred<"::mlir::isa<::cir::ArrayType>(" - "::mlir::cast<::cir::PointerType>($_self).getPointee())">, - ]>, "!cir.ptr"> { -} - //===----------------------------------------------------------------------===// // RecordType //