[Mlir-commits] [mlir] [mlir][spirv] Add support for structs decorations (PR #149793)
Igor Wodiany
llvmlistbot at llvm.org
Tue Jul 22 07:48: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 {
----------------
IgWod-IMG wrote:
Sounds good! I think the best approach here would be to land a separate PR aligning `MemberDecorationInfo` to contemporary coding standard, i.e., make `==` and `<` friend, and potentially remove `hasValue`. Then I can update this PR addressing your feedback, and we don't have to concern ourselves with the mismatch with the existing code in here.
https://github.com/llvm/llvm-project/pull/149793
More information about the Mlir-commits
mailing list