diff --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td --- a/mlir/include/mlir/IR/OpBase.td +++ b/mlir/include/mlir/IR/OpBase.td @@ -1655,16 +1655,6 @@ def IsNullAttr : AttrConstraint< CPred<"!$_self">, "empty attribute (for optional attributes)">; -// An attribute constraint on FlatSymbolRefAttr that requires that the -// reference point to an op of `opClass` within the closest parent with a symbol -// table. -// TODO: Add support for nested symbol references. -class ReferToOp : AttrConstraint< - CPred<"isa_and_nonnull<" # opClass # ">(" - "::mlir::SymbolTable::lookupNearestSymbolFrom(" - "&$_op, $_self.cast<::mlir::FlatSymbolRefAttr>().getAttr()))">, - "referencing to a '" # opClass # "' symbol">; - //===----------------------------------------------------------------------===// // Region definitions //===----------------------------------------------------------------------===// diff --git a/mlir/test/IR/attribute.mlir b/mlir/test/IR/attribute.mlir --- a/mlir/test/IR/attribute.mlir +++ b/mlir/test/IR/attribute.mlir @@ -608,11 +608,6 @@ // ----- -// expected-error @+1 {{referencing to a 'func::FuncOp' symbol}} -"test.symbol_ref_attr"() {symbol = @foo} : () -> () - -// ----- - //===----------------------------------------------------------------------===// // Test IntElementsAttr //===----------------------------------------------------------------------===// diff --git a/mlir/test/lib/Dialect/Test/TestOps.td b/mlir/test/lib/Dialect/Test/TestOps.td --- a/mlir/test/lib/Dialect/Test/TestOps.td +++ b/mlir/test/lib/Dialect/Test/TestOps.td @@ -378,16 +378,6 @@ let assemblyFormat = "$value (`tag` $tag^)? attr-dict"; } -//===----------------------------------------------------------------------===// -// Test Attribute Constraints -//===----------------------------------------------------------------------===// - -def SymbolRefOp : TEST_Op<"symbol_ref_attr"> { - let arguments = (ins - ConfinedAttr]>:$symbol - ); -} - //===----------------------------------------------------------------------===// // Test Regions //===----------------------------------------------------------------------===//