[Mlir-commits] [mlir] [mlir][emitc] Add ArrayType (PR #83386)

Matthias Gehre llvmlistbot at llvm.org
Sat Mar 2 15:12:57 PST 2024


================
@@ -11,3 +11,57 @@ func.func @illegal_opaque_type_2() {
     // expected-error @+1 {{pointer not allowed as outer type with !emitc.opaque, use !emitc.ptr instead}}
     %1 = "emitc.variable"(){value = "nullptr" : !emitc.opaque<"int32_t*">} : () -> !emitc.opaque<"int32_t*">
 }
+
----------------
mgehre-amd wrote:

I was following `emitc.ptr` which seems to allow all kinds of pointee types in the dialect itself, and only fails in `TranslateToCpp` if the pointee type is not understood. Do you want to have a different design for `emitc.array`?
Or are you asking to add tests to `mlir/test/Target/Cpp/invalid.mlir` that show errors when trying to emit arrays with those element types?

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


More information about the Mlir-commits mailing list