[Mlir-commits] [mlir] 02b9ddb - [mlir] Disable warning in test of deprecated feature (NFC)

Jacques Pienaar llvmlistbot at llvm.org
Thu Jun 16 20:15:19 PDT 2022


Author: Jacques Pienaar
Date: 2022-06-16T20:15:13-07:00
New Revision: 02b9ddb2f218ae7053fa5f15aeb636e5884257e1

URL: https://github.com/llvm/llvm-project/commit/02b9ddb2f218ae7053fa5f15aeb636e5884257e1
DIFF: https://github.com/llvm/llvm-project/commit/02b9ddb2f218ae7053fa5f15aeb636e5884257e1.diff

LOG: [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.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/test/IR/attribute.mlir b/mlir/test/IR/attribute.mlir
index feb2a93e9af42..1cdf7728577e1 100644
--- a/mlir/test/IR/attribute.mlir
+++ b/mlir/test/IR/attribute.mlir
@@ -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"'}}

diff  --git a/mlir/test/lib/Dialect/Test/CMakeLists.txt b/mlir/test/lib/Dialect/Test/CMakeLists.txt
index 2df8718e5f6a7..22a16e4fff770 100644
--- a/mlir/test/lib/Dialect/Test/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/Test/CMakeLists.txt
@@ -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)

diff  --git a/mlir/test/lib/Dialect/Test/TestOps.td b/mlir/test/lib/Dialect/Test/TestOps.td
index 9ce9b21f15fdd..c100aa2dbd67f 100644
--- a/mlir/test/lib/Dialect/Test/TestOps.td
+++ b/mlir/test/lib/Dialect/Test/TestOps.td
@@ -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,

diff  --git a/mlir/unittests/TableGen/CMakeLists.txt b/mlir/unittests/TableGen/CMakeLists.txt
index 5e365f7c49f80..ebc76883648fc 100644
--- a/mlir/unittests/TableGen/CMakeLists.txt
+++ b/mlir/unittests/TableGen/CMakeLists.txt
@@ -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)


        


More information about the Mlir-commits mailing list