[mlir] Disable warning in test of deprecated feature (NFC)
authorJacques Pienaar <jpienaar@google.com>
Fri, 17 Jun 2022 03:15:13 +0000 (20:15 -0700)
committerJacques Pienaar <jpienaar@google.com>
Fri, 17 Jun 2022 03:15:13 +0000 (20:15 -0700)
Disable warning for deprecation in test of deprecated feature. Also
remove additional test of deprecated feature from TestOps.td.

mlir/test/IR/attribute.mlir
mlir/test/lib/Dialect/Test/CMakeLists.txt
mlir/test/lib/Dialect/Test/TestOps.td
mlir/unittests/TableGen/CMakeLists.txt

index feb2a93e9af424307d6c3d9514a47f30845a07d9..1cdf7728577e1479a534be2a5391f4e5c4c12e08 100644 (file)
@@ -639,26 +639,6 @@ func.func @wrong_shape_fail() {
   return
 }
 
-//===----------------------------------------------------------------------===//
-// Test StructAttr
-//===----------------------------------------------------------------------===//
-
-// -----
-
-func.func @missing_fields() {
-  // expected-error @+1 {{failed to satisfy constraint: DictionaryAttr with field(s): 'some_field', 'some_other_field' (each field having its own constraints)}}
-  "test.struct_attr"() {the_struct_attr = {}} : () -> ()
-  return
-}
-
-// -----
-
-func.func @erroneous_fields() {
-  // expected-error @+1 {{failed to satisfy constraint: DictionaryAttr with field(s): 'some_field', 'some_other_field' (each field having its own constraints)}}
-  "test.struct_attr"() {the_struct_attr = {some_field = 1 : i8, some_other_field = 1}} : () -> ()
-  return
-}
-
 // -----
 
 // expected-error @+1 {{invalid dialect namespace '"string with space"'}}
index 2df8718e5f6a7b0e61f04efc1f04ed9b39bdf24b..22a16e4fff77065d5eaf7f87741503662bf7a575 100644 (file)
@@ -23,7 +23,6 @@ mlir_tablegen(TestTypeDefs.h.inc -gen-typedef-decls -typedefs-dialect=test)
 mlir_tablegen(TestTypeDefs.cpp.inc -gen-typedef-defs -typedefs-dialect=test)
 add_public_tablegen_target(MLIRTestTypeDefIncGen)
 
-
 set(LLVM_TARGET_DEFINITIONS TestOps.td)
 mlir_tablegen(TestOps.h.inc -gen-op-decls)
 mlir_tablegen(TestOps.cpp.inc -gen-op-defs)
index 9ce9b21f15fdd7d0ef5e0e57d977a009e73c7aea..c100aa2dbd67fe0668f08b93463bc9444bf342e3 100644 (file)
@@ -215,16 +215,6 @@ def I64EnumAttrOp : TEST_Op<"i64_enum_attr"> {
   let results = (outs I32:$val);
 }
 
-def SomeStructAttr : StructAttr<"SomeStructAttr", Test_Dialect, [
-  StructFieldAttr<"some_field", I64Attr>,
-  StructFieldAttr<"some_other_field", I64Attr>
-]> {}
-
-def StructAttrOp : TEST_Op<"struct_attr"> {
-  let arguments = (ins SomeStructAttr:$the_struct_attr);
-  let results = (outs);
-}
-
 def IntAttrOp : TEST_Op<"int_attrs"> {
   let arguments = (ins
     AnyI32Attr:$any_i32_attr,
index 5e365f7c49f809cbcc20d9ad5f0e081ec97634af..ebc76883648fc652c241ba5f88b9267b6bba2ec0 100644 (file)
@@ -3,9 +3,11 @@ mlir_tablegen(EnumsGenTest.h.inc -gen-enum-decls)
 mlir_tablegen(EnumsGenTest.cpp.inc -gen-enum-defs)
 add_public_tablegen_target(MLIRTableGenEnumsIncGen)
 
+# FIXME: This test is for deprecated feature being remove so warnings are
+# disabled on it.
 set(LLVM_TARGET_DEFINITIONS structs.td)
-mlir_tablegen(StructAttrGenTest.h.inc -gen-struct-attr-decls)
-mlir_tablegen(StructAttrGenTest.cpp.inc -gen-struct-attr-defs)
+mlir_tablegen(StructAttrGenTest.h.inc -gen-struct-attr-decls --on-deprecated=none)
+mlir_tablegen(StructAttrGenTest.cpp.inc -gen-struct-attr-defs --on-deprecated=none)
 add_public_tablegen_target(MLIRTableGenStructAttrIncGen)
 
 set(LLVM_TARGET_DEFINITIONS passes.td)