[Mlir-commits] [mlir] [mlir][irdl] Fix missing verifier in irdl.parametric (PR #92700)

Fehr Mathieu llvmlistbot at llvm.org
Sun May 19 13:47:54 PDT 2024


================
@@ -132,22 +132,37 @@ LogicalResult BaseOp::verify() {
   return success();
 }
 
+static LogicalResult
+checkSymbolIsTypeOrAttribute(SymbolTableCollection &symbolTable,
+                             Operation *source, SymbolRefAttr symbol) {
+  Operation *targetOp = symbolTable.lookupNearestSymbolFrom(source, symbol);
+  if (!targetOp)
+    return source->emitOpError() << "symbol '" << symbol << "' not found";
+
+  if (!isa<TypeOp, AttributeOp>(targetOp))
+    return source->emitOpError() << "'" << symbol
----------------
math-fehr wrote:

```suggestion
    return source->emitOpError() << "symbol '" << symbol
```

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


More information about the Mlir-commits mailing list