[Mlir-commits] [mlir] [mlir] Expose type and attribute names in the MLIRContext and abstract type/attr classes (PR #72189)

Fehr Mathieu llvmlistbot at llvm.org
Tue Nov 14 07:26:19 PST 2023


================
@@ -72,6 +72,9 @@ class StructType : public mlir::Type::TypeBase<StructType, mlir::Type,
 
   /// Returns the number of element type held by this struct.
   size_t getNumElementTypes() { return getElementTypes().size(); }
+
+  /// Returns the name of this struct type.
+  static constexpr StringRef getTypeName() { return "toy.struct"; }
----------------
math-fehr wrote:

Oh yes, that makes more sense, I'll fix that!

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


More information about the Mlir-commits mailing list