[Mlir-commits] [mlir] [mlir][spirv] Add support for structs decorations (PR #149793)

Jakub Kuderski llvmlistbot at llvm.org
Tue Jul 22 07:50:29 PDT 2025


================
@@ -327,10 +327,33 @@ class StructType
     }
   };
 
+  // Type for specifying the decoration(s) on the struct itself
+  struct StructDecorationInfo {
+    bool hasValue;
+    Decoration decoration;
+    Attribute decorationValue;
+
+    StructDecorationInfo(bool hasValue, Decoration decoration,
+                         Attribute decorationValue)
+        : hasValue(hasValue), decoration(decoration),
+          decorationValue(decorationValue) {}
+
+    bool operator==(const StructDecorationInfo &other) const {
+      return (this->decoration == other.decoration) &&
+             (this->decorationValue == other.decorationValue);
+    }
+
+    bool operator<(const StructDecorationInfo &other) const {
----------------
kuhar wrote:

SGTM!

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


More information about the Mlir-commits mailing list