[Mlir-commits] [mlir] [MLIR] Remove deprecated setting usePropertiesForAttributes (PR #182327)

Jacques Pienaar llvmlistbot at llvm.org
Fri Feb 20 06:57:27 PST 2026


================
@@ -3936,18 +3796,11 @@ void OpEmitter::genTypeInterfaceMethods() {
                        op.getArg(arg.operandOrAttributeIndex()))) {
           body << "  ::mlir::TypedAttr odsInferredTypeAttr" << inferredTypeIdx
                << " = ";
-          if (op.getDialect().usePropertiesForAttributes()) {
-            body << "(properties ? properties.as<Properties *>()->"
-                 << attr->name
-                 << " : "
-                    "::llvm::dyn_cast_or_null<::mlir::TypedAttr>(attributes."
-                    "get(\"" +
-                        attr->name + "\")));\n";
-          } else {
-            body << "::llvm::dyn_cast_or_null<::mlir::TypedAttr>(attributes."
-                    "get(\"" +
-                        attr->name + "\"));\n";
-          }
+          body << "(properties ? properties.as<Properties *>()->" << attr->name
+               << " : "
+                  "::llvm::dyn_cast_or_null<::mlir::TypedAttr>(attributes."
----------------
jpienaar wrote:

I feel like an extra << here could end up saving a line.

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


More information about the Mlir-commits mailing list