2019-10-21 00:44:06 +08:00
|
|
|
//===-- structs.td - StructsGen test definition file -------*- tablegen -*-===//
|
2019-08-31 03:51:31 +08:00
|
|
|
//
|
2020-01-26 11:58:30 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
2019-12-24 01:35:36 +08:00
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2019-08-31 03:51:31 +08:00
|
|
|
//
|
2019-12-24 01:35:36 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2019-08-31 03:51:31 +08:00
|
|
|
|
|
|
|
include "mlir/IR/OpBase.td"
|
|
|
|
|
|
|
|
def Test_Dialect : Dialect {
|
|
|
|
let name = "test";
|
|
|
|
}
|
|
|
|
|
|
|
|
def Test_Struct : StructAttr<"TestStruct", Test_Dialect, [
|
|
|
|
StructFieldAttr<"sample_integer", I32Attr>,
|
|
|
|
StructFieldAttr<"sample_float", F32Attr>,
|
2020-02-19 02:04:26 +08:00
|
|
|
StructFieldAttr<"sample_elements", I32ElementsAttr>,
|
|
|
|
StructFieldAttr<"sample_optional_integer",
|
2020-09-03 21:44:37 +08:00
|
|
|
OptionalAttr<I32Attr>>,
|
|
|
|
StructFieldAttr<"sample_default_valued_integer",
|
|
|
|
DefaultValuedAttr<I32Attr, "42">>] > {
|
2021-01-07 06:08:03 +08:00
|
|
|
let summary = "Structure for test data";
|
2019-08-31 03:51:31 +08:00
|
|
|
}
|