Skip to content

Commit 02b9ddb

Browse files
committed
[mlir] Disable warning in test of deprecated feature (NFC)
Disable warning for deprecation in test of deprecated feature. Also remove additional test of deprecated feature from TestOps.td.
1 parent d30c022 commit 02b9ddb

File tree

4 files changed

+4
-33
lines changed

4 files changed

+4
-33
lines changed

mlir/test/IR/attribute.mlir

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -639,26 +639,6 @@ func.func @wrong_shape_fail() {
639639
return
640640
}
641641

642-
//===----------------------------------------------------------------------===//
643-
// Test StructAttr
644-
//===----------------------------------------------------------------------===//
645-
646-
// -----
647-
648-
func.func @missing_fields() {
649-
// expected-error @+1 {{failed to satisfy constraint: DictionaryAttr with field(s): 'some_field', 'some_other_field' (each field having its own constraints)}}
650-
"test.struct_attr"() {the_struct_attr = {}} : () -> ()
651-
return
652-
}
653-
654-
// -----
655-
656-
func.func @erroneous_fields() {
657-
// expected-error @+1 {{failed to satisfy constraint: DictionaryAttr with field(s): 'some_field', 'some_other_field' (each field having its own constraints)}}
658-
"test.struct_attr"() {the_struct_attr = {some_field = 1 : i8, some_other_field = 1}} : () -> ()
659-
return
660-
}
661-
662642
// -----
663643

664644
// expected-error @+1 {{invalid dialect namespace '"string with space"'}}

mlir/test/lib/Dialect/Test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ mlir_tablegen(TestTypeDefs.h.inc -gen-typedef-decls -typedefs-dialect=test)
2323
mlir_tablegen(TestTypeDefs.cpp.inc -gen-typedef-defs -typedefs-dialect=test)
2424
add_public_tablegen_target(MLIRTestTypeDefIncGen)
2525

26-
2726
set(LLVM_TARGET_DEFINITIONS TestOps.td)
2827
mlir_tablegen(TestOps.h.inc -gen-op-decls)
2928
mlir_tablegen(TestOps.cpp.inc -gen-op-defs)

mlir/test/lib/Dialect/Test/TestOps.td

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,6 @@ def I64EnumAttrOp : TEST_Op<"i64_enum_attr"> {
215215
let results = (outs I32:$val);
216216
}
217217

218-
def SomeStructAttr : StructAttr<"SomeStructAttr", Test_Dialect, [
219-
StructFieldAttr<"some_field", I64Attr>,
220-
StructFieldAttr<"some_other_field", I64Attr>
221-
]> {}
222-
223-
def StructAttrOp : TEST_Op<"struct_attr"> {
224-
let arguments = (ins SomeStructAttr:$the_struct_attr);
225-
let results = (outs);
226-
}
227-
228218
def IntAttrOp : TEST_Op<"int_attrs"> {
229219
let arguments = (ins
230220
AnyI32Attr:$any_i32_attr,

mlir/unittests/TableGen/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ mlir_tablegen(EnumsGenTest.h.inc -gen-enum-decls)
33
mlir_tablegen(EnumsGenTest.cpp.inc -gen-enum-defs)
44
add_public_tablegen_target(MLIRTableGenEnumsIncGen)
55

6+
# FIXME: This test is for deprecated feature being remove so warnings are
7+
# disabled on it.
68
set(LLVM_TARGET_DEFINITIONS structs.td)
7-
mlir_tablegen(StructAttrGenTest.h.inc -gen-struct-attr-decls)
8-
mlir_tablegen(StructAttrGenTest.cpp.inc -gen-struct-attr-defs)
9+
mlir_tablegen(StructAttrGenTest.h.inc -gen-struct-attr-decls --on-deprecated=none)
10+
mlir_tablegen(StructAttrGenTest.cpp.inc -gen-struct-attr-defs --on-deprecated=none)
911
add_public_tablegen_target(MLIRTableGenStructAttrIncGen)
1012

1113
set(LLVM_TARGET_DEFINITIONS passes.td)

0 commit comments

Comments
 (0)