[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 10 11:15:56 PDT 2025


================
@@ -280,6 +280,25 @@ def CIR_BoolType :
   }];
 }
 
+//===----------------------------------------------------------------------===//
+// ArrayType
+//===----------------------------------------------------------------------===//
+
+def CIR_ArrayType : CIR_Type<"Array", "array",
+    [DeclareTypeInterfaceMethods<DataLayoutTypeInterface>]> {
+
+  let summary = "CIR array type";
+  let description = [{
+    `CIR.array` represents C/C++ constant arrays.
+  }];
+
+  let parameters = (ins "mlir::Type":$eltType, "uint64_t":$size);
+
+  let assemblyFormat = [{
+    `<` $eltType `x` $size `>`
----------------
bcardosolopes wrote:

Please add CIR to CIR tests to exercise the parser

https://github.com/llvm/llvm-project/pull/130502


More information about the cfe-commits mailing list