1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* AttrDef Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9#ifdef GET_ATTRDEF_CLASSES
10#undef GET_ATTRDEF_CLASSES
11
12
13namespace mlir {
14class AsmParser;
15class AsmPrinter;
16} // namespace mlir
17namespace test {
18class SimpleAAttr;
19class CompoundAAttr;
20class CompoundAttrNestedAttr;
21class AttrWithSelfTypeParamAttr;
22class AttrWithTypeBuilderAttr;
23class AttrWithTraitAttr;
24class TestDecimalShapeAttr;
25class TestI64ElementsAttr;
26class TestSubElementsAccessAttr;
27class CompoundNestedInnerAttr;
28class CompoundNestedOuterAttr;
29class CompoundNestedOuterQualAttr;
30class TestAttrWithFormatAttr;
31class TestAttrWithOptionalSignedAttr;
32class TestAttrWithOptionalUnsignedAttr;
33class TestAttrWithOptionalEnumAttr;
34class TestAttrUglyAttr;
35class TestAttrParamsAttr;
36class TestAttrWithTypeParamAttr;
37class TestAttrSelfTypeParameterFormatAttr;
38class TestAttrSelfTypeParameterStructFormatAttr;
39class TestOverrideBuilderAttr;
40class TestExtern1DI64ElementsAttr;
41class ArrayOfUglyAttrsAttr;
42class ArrayOfIntsAttr;
43/// allowed i32 cases: 0, 1
44/// Enum cases:
45/// * a (`a`)
46/// * b (`b`)
47class SimpleEnumAttr;
48class ArrayOfEnumsAttr;
49class TestCustomAnchorAttr;
50/// Iterator type
51class IteratorTypeAttr;
52class TestCopyCountAttr;
53class TestConditionalAliasAttr;
54class TestCustomFloatAttr;
55class TestCustomStructAttr;
56class TestConstMemorySpaceAttr;
57class TestCustomLocationAttr;
58class TestOpAsmAttrInterfaceAttr;
59class TestOpAsmAttrInterfaceTablegenDefaultAttr;
60class SlashAttr;
61class TestCustomStorageCtorAttrAttr;
62/// a test enum
63class TestEnumAttr;
64/// a test bit enum
65/// Enum cases:
66/// * read (`Read`)
67/// * write (`Write`)
68/// * execute (`Execute`)
69class TestBitEnumAttr;
70/// another test bit enum
71/// Enum cases:
72/// * user (`User`)
73/// * group (`Group`)
74/// * other (`Other`)
75class TestBitEnumVerticalBarAttr;
76class SimpleAAttr : public ::mlir::Attribute::AttrBase<SimpleAAttr, ::mlir::Attribute, ::mlir::AttributeStorage> {
77public:
78 using Base::Base;
79 static constexpr ::llvm::StringLiteral name = "test.smpla";
80 static constexpr ::llvm::StringLiteral dialectName = "test";
81 static constexpr ::llvm::StringLiteral getMnemonic() {
82 return {"smpla"};
83 }
84
85};
86namespace detail {
87struct CompoundAAttrStorage;
88} // namespace detail
89class CompoundAAttr : public ::mlir::Attribute::AttrBase<CompoundAAttr, ::mlir::Attribute, detail::CompoundAAttrStorage> {
90public:
91 using Base::Base;
92 static constexpr ::llvm::StringLiteral name = "test.cmpnd_a";
93 static constexpr ::llvm::StringLiteral dialectName = "test";
94 static CompoundAAttr get(::mlir::MLIRContext *context, int widthOfSomething, ::mlir::Type oneType, ::llvm::ArrayRef<int> arrayOfInts);
95 static constexpr ::llvm::StringLiteral getMnemonic() {
96 return {"cmpnd_a"};
97 }
98
99 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
100 void print(::mlir::AsmPrinter &odsPrinter) const;
101 int getWidthOfSomething() const;
102 ::mlir::Type getOneType() const;
103 ::llvm::ArrayRef<int> getArrayOfInts() const;
104};
105namespace detail {
106struct CompoundAttrNestedAttrStorage;
107} // namespace detail
108class CompoundAttrNestedAttr : public ::mlir::Attribute::AttrBase<CompoundAttrNestedAttr, ::mlir::Attribute, detail::CompoundAttrNestedAttrStorage> {
109public:
110 using Base::Base;
111 static constexpr ::llvm::StringLiteral name = "test.cmpnd_nested";
112 static constexpr ::llvm::StringLiteral dialectName = "test";
113 using Base::getChecked;
114 static CompoundAttrNestedAttr get(::mlir::MLIRContext *context, ::test::CompoundAAttr nested);
115 static CompoundAttrNestedAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::test::CompoundAAttr nested);
116 static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundAAttr nested);
117 static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundAAttr nested);
118 static constexpr ::llvm::StringLiteral getMnemonic() {
119 return {"cmpnd_nested"};
120 }
121
122 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
123 void print(::mlir::AsmPrinter &odsPrinter) const;
124 ::test::CompoundAAttr getNested() const;
125};
126namespace detail {
127struct AttrWithSelfTypeParamAttrStorage;
128} // namespace detail
129class AttrWithSelfTypeParamAttr : public ::mlir::Attribute::AttrBase<AttrWithSelfTypeParamAttr, ::mlir::Attribute, detail::AttrWithSelfTypeParamAttrStorage, ::mlir::TypedAttr::Trait> {
130public:
131 using Base::Base;
132 static constexpr ::llvm::StringLiteral name = "test.attr_with_self_type_param";
133 static constexpr ::llvm::StringLiteral dialectName = "test";
134 static AttrWithSelfTypeParamAttr get(::mlir::MLIRContext *context, ::mlir::Type type);
135 static constexpr ::llvm::StringLiteral getMnemonic() {
136 return {"attr_with_self_type_param"};
137 }
138
139 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
140 void print(::mlir::AsmPrinter &odsPrinter) const;
141 ::mlir::Type getType() const;
142};
143namespace detail {
144struct AttrWithTypeBuilderAttrStorage;
145} // namespace detail
146class AttrWithTypeBuilderAttr : public ::mlir::Attribute::AttrBase<AttrWithTypeBuilderAttr, ::mlir::Attribute, detail::AttrWithTypeBuilderAttrStorage, ::mlir::TypedAttr::Trait> {
147public:
148 using Base::Base;
149 static constexpr ::llvm::StringLiteral name = "test.attr_with_type_builder";
150 static constexpr ::llvm::StringLiteral dialectName = "test";
151 static AttrWithTypeBuilderAttr get(::mlir::MLIRContext *context, ::mlir::IntegerAttr attr, mlir::Type type);
152 static constexpr ::llvm::StringLiteral getMnemonic() {
153 return {"attr_with_type_builder"};
154 }
155
156 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
157 void print(::mlir::AsmPrinter &odsPrinter) const;
158 ::mlir::IntegerAttr getAttr() const;
159 mlir::Type getType() const;
160};
161class AttrWithTraitAttr : public ::mlir::Attribute::AttrBase<AttrWithTraitAttr, ::mlir::Attribute, ::mlir::AttributeStorage, ::mlir::AttributeTrait::TestAttrTrait> {
162public:
163 using Base::Base;
164 static constexpr ::llvm::StringLiteral name = "test.attr_with_trait";
165 static constexpr ::llvm::StringLiteral dialectName = "test";
166 static constexpr ::llvm::StringLiteral getMnemonic() {
167 return {"attr_with_trait"};
168 }
169
170};
171namespace detail {
172struct TestDecimalShapeAttrStorage;
173} // namespace detail
174class TestDecimalShapeAttr : public ::mlir::Attribute::AttrBase<TestDecimalShapeAttr, ::mlir::Attribute, detail::TestDecimalShapeAttrStorage> {
175public:
176 using Base::Base;
177 static constexpr ::llvm::StringLiteral name = "test.decimal_shape";
178 static constexpr ::llvm::StringLiteral dialectName = "test";
179 static TestDecimalShapeAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<int64_t> shape);
180 static constexpr ::llvm::StringLiteral getMnemonic() {
181 return {"decimal_shape"};
182 }
183
184 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
185 void print(::mlir::AsmPrinter &odsPrinter) const;
186 ::llvm::ArrayRef<int64_t> getShape() const;
187};
188namespace detail {
189struct TestI64ElementsAttrStorage;
190} // namespace detail
191class TestI64ElementsAttr : public ::mlir::Attribute::AttrBase<TestI64ElementsAttr, ::mlir::Attribute, detail::TestI64ElementsAttrStorage, ::mlir::TypedAttr::Trait, ::mlir::ElementsAttr::Trait> {
192public:
193 using Base::Base;
194 /// The set of data types that can be iterated by this attribute.
195 using ContiguousIterableTypesT = std::tuple<uint64_t>;
196 using NonContiguousIterableTypesT = std::tuple<mlir::Attribute, llvm::APInt>;
197
198 /// Provide begin iterators for the various iterable types.
199 // * uint64_t
200 mlir::FailureOr<const uint64_t *>
201 try_value_begin_impl(OverloadToken<uint64_t>) const {
202 return getElements().begin();
203 }
204 // * Attribute
205 auto try_value_begin_impl(OverloadToken<mlir::Attribute>) const {
206 mlir::Type elementType = getType().getElementType();
207 return mlir::success(Y: llvm::map_range(C: getElements(), F: [=](uint64_t value) {
208 return mlir::IntegerAttr::get(type: elementType,
209 value: llvm::APInt(/*numBits=*/64, value));
210 }).begin());
211 }
212 // * APInt
213 auto try_value_begin_impl(OverloadToken<llvm::APInt>) const {
214 return mlir::success(Y: llvm::map_range(C: getElements(), F: [=](uint64_t value) {
215 return llvm::APInt(/*numBits=*/64, value);
216 }).begin());
217 }
218 static constexpr ::llvm::StringLiteral name = "test.i64_elements";
219 static constexpr ::llvm::StringLiteral dialectName = "test";
220 using Base::getChecked;
221 static TestI64ElementsAttr get(::mlir::MLIRContext *context, ::mlir::ShapedType type, ::llvm::ArrayRef<uint64_t> elements);
222 static TestI64ElementsAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::mlir::ShapedType type, ::llvm::ArrayRef<uint64_t> elements);
223 static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::ShapedType type, ::llvm::ArrayRef<uint64_t> elements);
224 static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::ShapedType type, ::llvm::ArrayRef<uint64_t> elements);
225 static constexpr ::llvm::StringLiteral getMnemonic() {
226 return {"i64_elements"};
227 }
228
229 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
230 void print(::mlir::AsmPrinter &odsPrinter) const;
231 ::mlir::ShapedType getType() const;
232 ::llvm::ArrayRef<uint64_t> getElements() const;
233};
234namespace detail {
235struct TestSubElementsAccessAttrStorage;
236} // namespace detail
237class TestSubElementsAccessAttr : public ::mlir::Attribute::AttrBase<TestSubElementsAccessAttr, ::mlir::Attribute, detail::TestSubElementsAccessAttrStorage> {
238public:
239 using Base::Base;
240 static constexpr ::llvm::StringLiteral name = "test.sub_elements_access";
241 static constexpr ::llvm::StringLiteral dialectName = "test";
242 static TestSubElementsAccessAttr get(::mlir::MLIRContext *context, ::mlir::Attribute first, ::mlir::Attribute second, ::mlir::Attribute third);
243 static constexpr ::llvm::StringLiteral getMnemonic() {
244 return {"sub_elements_access"};
245 }
246
247 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
248 void print(::mlir::AsmPrinter &odsPrinter) const;
249 ::mlir::Attribute getFirst() const;
250 ::mlir::Attribute getSecond() const;
251 ::mlir::Attribute getThird() const;
252};
253namespace detail {
254struct CompoundNestedInnerAttrStorage;
255} // namespace detail
256class CompoundNestedInnerAttr : public ::mlir::Attribute::AttrBase<CompoundNestedInnerAttr, ::mlir::Attribute, detail::CompoundNestedInnerAttrStorage> {
257public:
258 using Base::Base;
259 static constexpr ::llvm::StringLiteral name = "test.cmpnd_nested_inner";
260 static constexpr ::llvm::StringLiteral dialectName = "test";
261 using Base::getChecked;
262 static CompoundNestedInnerAttr get(::mlir::MLIRContext *context, int some_int, ::test::CompoundAAttr cmpdA);
263 static CompoundNestedInnerAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int some_int, ::test::CompoundAAttr cmpdA);
264 static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int some_int, ::test::CompoundAAttr cmpdA);
265 static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int some_int, ::test::CompoundAAttr cmpdA);
266 static constexpr ::llvm::StringLiteral getMnemonic() {
267 return {"cmpnd_nested_inner"};
268 }
269
270 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
271 void print(::mlir::AsmPrinter &odsPrinter) const;
272 int getSomeInt() const;
273 ::test::CompoundAAttr getCmpdA() const;
274};
275namespace detail {
276struct CompoundNestedOuterAttrStorage;
277} // namespace detail
278class CompoundNestedOuterAttr : public ::mlir::Attribute::AttrBase<CompoundNestedOuterAttr, ::mlir::Attribute, detail::CompoundNestedOuterAttrStorage> {
279public:
280 using Base::Base;
281 static constexpr ::llvm::StringLiteral name = "test.cmpnd_nested_outer";
282 static constexpr ::llvm::StringLiteral dialectName = "test";
283 using Base::getChecked;
284 static CompoundNestedOuterAttr get(::mlir::MLIRContext *context, ::test::CompoundNestedInnerAttr inner);
285 static CompoundNestedOuterAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::test::CompoundNestedInnerAttr inner);
286 static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundNestedInnerAttr inner);
287 static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundNestedInnerAttr inner);
288 static constexpr ::llvm::StringLiteral getMnemonic() {
289 return {"cmpnd_nested_outer"};
290 }
291
292 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
293 void print(::mlir::AsmPrinter &odsPrinter) const;
294 ::test::CompoundNestedInnerAttr getInner() const;
295};
296namespace detail {
297struct CompoundNestedOuterQualAttrStorage;
298} // namespace detail
299class CompoundNestedOuterQualAttr : public ::mlir::Attribute::AttrBase<CompoundNestedOuterQualAttr, ::mlir::Attribute, detail::CompoundNestedOuterQualAttrStorage> {
300public:
301 using Base::Base;
302 static constexpr ::llvm::StringLiteral name = "test.cmpnd_nested_outer_qual";
303 static constexpr ::llvm::StringLiteral dialectName = "test";
304 using Base::getChecked;
305 static CompoundNestedOuterQualAttr get(::mlir::MLIRContext *context, ::test::CompoundNestedInnerAttr inner);
306 static CompoundNestedOuterQualAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::test::CompoundNestedInnerAttr inner);
307 static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundNestedInnerAttr inner);
308 static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundNestedInnerAttr inner);
309 static constexpr ::llvm::StringLiteral getMnemonic() {
310 return {"cmpnd_nested_outer_qual"};
311 }
312
313 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
314 void print(::mlir::AsmPrinter &odsPrinter) const;
315 ::test::CompoundNestedInnerAttr getInner() const;
316};
317namespace detail {
318struct TestAttrWithFormatAttrStorage;
319} // namespace detail
320class TestAttrWithFormatAttr : public ::mlir::Attribute::AttrBase<TestAttrWithFormatAttr, ::mlir::Attribute, detail::TestAttrWithFormatAttrStorage> {
321public:
322 using Base::Base;
323 static constexpr ::llvm::StringLiteral name = "test.attr_with_format";
324 static constexpr ::llvm::StringLiteral dialectName = "test";
325 using Base::getChecked;
326 static TestAttrWithFormatAttr get(::mlir::MLIRContext *context, int64_t one, std::string two, ::mlir::IntegerAttr three, ::llvm::ArrayRef<int> four, uint64_t five, ::llvm::ArrayRef<int> six, ::llvm::ArrayRef<AttrWithTypeBuilderAttr> arrayOfAttrWithTypeBuilderAttr);
327 static TestAttrWithFormatAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int64_t one, std::string two, ::mlir::IntegerAttr three, ::llvm::ArrayRef<int> four, uint64_t five, ::llvm::ArrayRef<int> six, ::llvm::ArrayRef<AttrWithTypeBuilderAttr> arrayOfAttrWithTypeBuilderAttr);
328 static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int64_t one, std::string two, ::mlir::IntegerAttr three, ::llvm::ArrayRef<int> four, uint64_t five, ::llvm::ArrayRef<int> six, ::llvm::ArrayRef<AttrWithTypeBuilderAttr> arrayOfAttrWithTypeBuilderAttr);
329 static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int64_t one, std::string two, ::mlir::IntegerAttr three, ::llvm::ArrayRef<int> four, uint64_t five, ::llvm::ArrayRef<int> six, ::llvm::ArrayRef<AttrWithTypeBuilderAttr> arrayOfAttrWithTypeBuilderAttr);
330 static constexpr ::llvm::StringLiteral getMnemonic() {
331 return {"attr_with_format"};
332 }
333
334 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
335 void print(::mlir::AsmPrinter &odsPrinter) const;
336 int64_t getOne() const;
337 llvm::StringRef getTwo() const;
338 ::mlir::IntegerAttr getThree() const;
339 ::llvm::ArrayRef<int> getFour() const;
340 uint64_t getFive() const;
341 ::llvm::ArrayRef<int> getSix() const;
342 ::llvm::ArrayRef<AttrWithTypeBuilderAttr> getArrayOfAttrWithTypeBuilderAttr() const;
343};
344namespace detail {
345struct TestAttrWithOptionalSignedAttrStorage;
346} // namespace detail
347class TestAttrWithOptionalSignedAttr : public ::mlir::Attribute::AttrBase<TestAttrWithOptionalSignedAttr, ::mlir::Attribute, detail::TestAttrWithOptionalSignedAttrStorage> {
348public:
349 using Base::Base;
350 static constexpr ::llvm::StringLiteral name = "test.attr_with_optional_signed";
351 static constexpr ::llvm::StringLiteral dialectName = "test";
352 static TestAttrWithOptionalSignedAttr get(::mlir::MLIRContext *context, std::optional<int64_t> value);
353 static constexpr ::llvm::StringLiteral getMnemonic() {
354 return {"attr_with_optional_signed"};
355 }
356
357 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
358 void print(::mlir::AsmPrinter &odsPrinter) const;
359 std::optional<int64_t> getValue() const;
360};
361namespace detail {
362struct TestAttrWithOptionalUnsignedAttrStorage;
363} // namespace detail
364class TestAttrWithOptionalUnsignedAttr : public ::mlir::Attribute::AttrBase<TestAttrWithOptionalUnsignedAttr, ::mlir::Attribute, detail::TestAttrWithOptionalUnsignedAttrStorage> {
365public:
366 using Base::Base;
367 static constexpr ::llvm::StringLiteral name = "test.attr_with_optional_unsigned";
368 static constexpr ::llvm::StringLiteral dialectName = "test";
369 static TestAttrWithOptionalUnsignedAttr get(::mlir::MLIRContext *context, std::optional<uint64_t> value);
370 static constexpr ::llvm::StringLiteral getMnemonic() {
371 return {"attr_with_optional_unsigned"};
372 }
373
374 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
375 void print(::mlir::AsmPrinter &odsPrinter) const;
376 std::optional<uint64_t> getValue() const;
377};
378namespace detail {
379struct TestAttrWithOptionalEnumAttrStorage;
380} // namespace detail
381class TestAttrWithOptionalEnumAttr : public ::mlir::Attribute::AttrBase<TestAttrWithOptionalEnumAttr, ::mlir::Attribute, detail::TestAttrWithOptionalEnumAttrStorage> {
382public:
383 using Base::Base;
384 static constexpr ::llvm::StringLiteral name = "test.attr_with_optional_enum";
385 static constexpr ::llvm::StringLiteral dialectName = "test";
386 static TestAttrWithOptionalEnumAttr get(::mlir::MLIRContext *context, std::optional<SimpleEnum> value);
387 static constexpr ::llvm::StringLiteral getMnemonic() {
388 return {"attr_with_optional_enum"};
389 }
390
391 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
392 void print(::mlir::AsmPrinter &odsPrinter) const;
393 std::optional<SimpleEnum> getValue() const;
394};
395namespace detail {
396struct TestAttrUglyAttrStorage;
397} // namespace detail
398class TestAttrUglyAttr : public ::mlir::Attribute::AttrBase<TestAttrUglyAttr, ::mlir::Attribute, detail::TestAttrUglyAttrStorage> {
399public:
400 using Base::Base;
401 static constexpr ::llvm::StringLiteral name = "test.attr_ugly";
402 static constexpr ::llvm::StringLiteral dialectName = "test";
403 static TestAttrUglyAttr get(::mlir::MLIRContext *context, ::mlir::Attribute attr);
404 static constexpr ::llvm::StringLiteral getMnemonic() {
405 return {"attr_ugly"};
406 }
407
408 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
409 void print(::mlir::AsmPrinter &odsPrinter) const;
410 ::mlir::Attribute getAttr() const;
411};
412namespace detail {
413struct TestAttrParamsAttrStorage;
414} // namespace detail
415class TestAttrParamsAttr : public ::mlir::Attribute::AttrBase<TestAttrParamsAttr, ::mlir::Attribute, detail::TestAttrParamsAttrStorage> {
416public:
417 using Base::Base;
418 static constexpr ::llvm::StringLiteral name = "test.attr_params";
419 static constexpr ::llvm::StringLiteral dialectName = "test";
420 static TestAttrParamsAttr get(::mlir::MLIRContext *context, int v0, int v1);
421 static constexpr ::llvm::StringLiteral getMnemonic() {
422 return {"attr_params"};
423 }
424
425 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
426 void print(::mlir::AsmPrinter &odsPrinter) const;
427 int getV0() const;
428 int getV1() const;
429};
430namespace detail {
431struct TestAttrWithTypeParamAttrStorage;
432} // namespace detail
433class TestAttrWithTypeParamAttr : public ::mlir::Attribute::AttrBase<TestAttrWithTypeParamAttr, ::mlir::Attribute, detail::TestAttrWithTypeParamAttrStorage> {
434public:
435 using Base::Base;
436 static constexpr ::llvm::StringLiteral name = "test.attr_with_type";
437 static constexpr ::llvm::StringLiteral dialectName = "test";
438 static TestAttrWithTypeParamAttr get(::mlir::MLIRContext *context, ::mlir::IntegerType int_type, ::mlir::Type any_type);
439 static constexpr ::llvm::StringLiteral getMnemonic() {
440 return {"attr_with_type"};
441 }
442
443 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
444 void print(::mlir::AsmPrinter &odsPrinter) const;
445 ::mlir::IntegerType getIntType() const;
446 ::mlir::Type getAnyType() const;
447};
448namespace detail {
449struct TestAttrSelfTypeParameterFormatAttrStorage;
450} // namespace detail
451class TestAttrSelfTypeParameterFormatAttr : public ::mlir::Attribute::AttrBase<TestAttrSelfTypeParameterFormatAttr, ::mlir::Attribute, detail::TestAttrSelfTypeParameterFormatAttrStorage, ::mlir::TypedAttr::Trait> {
452public:
453 using Base::Base;
454 static constexpr ::llvm::StringLiteral name = "test.attr_self_type_format";
455 static constexpr ::llvm::StringLiteral dialectName = "test";
456 static TestAttrSelfTypeParameterFormatAttr get(::mlir::MLIRContext *context, int a, ::mlir::Type type);
457 static constexpr ::llvm::StringLiteral getMnemonic() {
458 return {"attr_self_type_format"};
459 }
460
461 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
462 void print(::mlir::AsmPrinter &odsPrinter) const;
463 int getA() const;
464 ::mlir::Type getType() const;
465};
466namespace detail {
467struct TestAttrSelfTypeParameterStructFormatAttrStorage;
468} // namespace detail
469class TestAttrSelfTypeParameterStructFormatAttr : public ::mlir::Attribute::AttrBase<TestAttrSelfTypeParameterStructFormatAttr, ::mlir::Attribute, detail::TestAttrSelfTypeParameterStructFormatAttrStorage, ::mlir::TypedAttr::Trait> {
470public:
471 using Base::Base;
472 static constexpr ::llvm::StringLiteral name = "test.attr_self_type_struct_format";
473 static constexpr ::llvm::StringLiteral dialectName = "test";
474 static TestAttrSelfTypeParameterStructFormatAttr get(::mlir::MLIRContext *context, int a, ::mlir::Type type);
475 static constexpr ::llvm::StringLiteral getMnemonic() {
476 return {"attr_self_type_struct_format"};
477 }
478
479 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
480 void print(::mlir::AsmPrinter &odsPrinter) const;
481 int getA() const;
482 ::mlir::Type getType() const;
483};
484namespace detail {
485struct TestOverrideBuilderAttrStorage;
486} // namespace detail
487class TestOverrideBuilderAttr : public ::mlir::Attribute::AttrBase<TestOverrideBuilderAttr, ::mlir::Attribute, detail::TestOverrideBuilderAttrStorage> {
488public:
489 using Base::Base;
490 static constexpr ::llvm::StringLiteral name = "test.override_builder";
491 static constexpr ::llvm::StringLiteral dialectName = "test";
492 static ::mlir::Attribute get(::mlir::MLIRContext *context, int a);
493 static constexpr ::llvm::StringLiteral getMnemonic() {
494 return {"override_builder"};
495 }
496
497 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
498 void print(::mlir::AsmPrinter &odsPrinter) const;
499 int getA() const;
500};
501namespace detail {
502struct TestExtern1DI64ElementsAttrStorage;
503} // namespace detail
504class TestExtern1DI64ElementsAttr : public ::mlir::Attribute::AttrBase<TestExtern1DI64ElementsAttr, ::mlir::Attribute, detail::TestExtern1DI64ElementsAttrStorage, ::mlir::TypedAttr::Trait, ::mlir::ElementsAttr::Trait> {
505public:
506 using Base::Base;
507 /// Return the elements referenced by this attribute.
508 llvm::ArrayRef<uint64_t> getElements() const;
509
510 /// The set of data types that can be iterated by this attribute.
511 using ContiguousIterableTypesT = std::tuple<uint64_t>;
512
513 /// Provide begin iterators for the various iterable types.
514 // * uint64_t
515 mlir::FailureOr<const uint64_t *>
516 try_value_begin_impl(OverloadToken<uint64_t>) const {
517 return getElements().begin();
518 }
519 static constexpr ::llvm::StringLiteral name = "test.e1di64_elements";
520 static constexpr ::llvm::StringLiteral dialectName = "test";
521 static TestExtern1DI64ElementsAttr get(::mlir::MLIRContext *context, ::mlir::ShapedType type, TestDialectResourceBlobHandle handle);
522 static constexpr ::llvm::StringLiteral getMnemonic() {
523 return {"e1di64_elements"};
524 }
525
526 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
527 void print(::mlir::AsmPrinter &odsPrinter) const;
528 ::mlir::ShapedType getType() const;
529 TestDialectResourceBlobHandle getHandle() const;
530};
531namespace detail {
532struct ArrayOfUglyAttrsAttrStorage;
533} // namespace detail
534class ArrayOfUglyAttrsAttr : public ::mlir::Attribute::AttrBase<ArrayOfUglyAttrsAttr, ::mlir::Attribute, detail::ArrayOfUglyAttrsAttrStorage> {
535public:
536 using Base::Base;
537 auto begin() const { return getValue().begin(); }
538 auto end() const { return getValue().end(); }
539 bool empty() const { return getValue().empty(); }
540 size_t size() const { return getValue().size(); }
541 auto &front() const { return getValue().front(); }
542 auto &back() const { return getValue().back(); }
543 auto &operator[](size_t index) { return getValue()[index]; }
544 operator ::llvm::ArrayRef<TestAttrUglyAttr>() const { return getValue(); }
545 static constexpr ::llvm::StringLiteral name = "test.array_of_ugly";
546 static constexpr ::llvm::StringLiteral dialectName = "test";
547 static ArrayOfUglyAttrsAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<TestAttrUglyAttr> value);
548 static constexpr ::llvm::StringLiteral getMnemonic() {
549 return {"array_of_ugly"};
550 }
551
552 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
553 void print(::mlir::AsmPrinter &odsPrinter) const;
554 ::llvm::ArrayRef<TestAttrUglyAttr> getValue() const;
555};
556namespace detail {
557struct ArrayOfIntsAttrStorage;
558} // namespace detail
559class ArrayOfIntsAttr : public ::mlir::Attribute::AttrBase<ArrayOfIntsAttr, ::mlir::Attribute, detail::ArrayOfIntsAttrStorage> {
560public:
561 using Base::Base;
562 auto begin() const { return getValue().begin(); }
563 auto end() const { return getValue().end(); }
564 bool empty() const { return getValue().empty(); }
565 size_t size() const { return getValue().size(); }
566 auto &front() const { return getValue().front(); }
567 auto &back() const { return getValue().back(); }
568 auto &operator[](size_t index) { return getValue()[index]; }
569 operator ::llvm::ArrayRef<int32_t>() const { return getValue(); }
570 static constexpr ::llvm::StringLiteral name = "test.array_of_ints";
571 static constexpr ::llvm::StringLiteral dialectName = "test";
572 static ArrayOfIntsAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<int32_t> value);
573 static constexpr ::llvm::StringLiteral getMnemonic() {
574 return {"array_of_ints"};
575 }
576
577 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
578 void print(::mlir::AsmPrinter &odsPrinter) const;
579 ::llvm::ArrayRef<int32_t> getValue() const;
580};
581namespace detail {
582struct SimpleEnumAttrStorage;
583} // namespace detail
584class SimpleEnumAttr : public ::mlir::Attribute::AttrBase<SimpleEnumAttr, ::mlir::Attribute, detail::SimpleEnumAttrStorage> {
585public:
586 using Base::Base;
587 static constexpr ::llvm::StringLiteral name = "test.simple_enum";
588 static constexpr ::llvm::StringLiteral dialectName = "test";
589 static SimpleEnumAttr get(::mlir::MLIRContext *context, ::test::SimpleEnum value);
590 static constexpr ::llvm::StringLiteral getMnemonic() {
591 return {"simple_enum"};
592 }
593
594 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
595 void print(::mlir::AsmPrinter &odsPrinter) const;
596 ::test::SimpleEnum getValue() const;
597};
598namespace detail {
599struct ArrayOfEnumsAttrStorage;
600} // namespace detail
601class ArrayOfEnumsAttr : public ::mlir::Attribute::AttrBase<ArrayOfEnumsAttr, ::mlir::Attribute, detail::ArrayOfEnumsAttrStorage> {
602public:
603 using Base::Base;
604 auto begin() const { return getValue().begin(); }
605 auto end() const { return getValue().end(); }
606 bool empty() const { return getValue().empty(); }
607 size_t size() const { return getValue().size(); }
608 auto &front() const { return getValue().front(); }
609 auto &back() const { return getValue().back(); }
610 auto &operator[](size_t index) { return getValue()[index]; }
611 operator ::llvm::ArrayRef<SimpleEnumAttr>() const { return getValue(); }
612 static constexpr ::llvm::StringLiteral name = "test.array_of_enums";
613 static constexpr ::llvm::StringLiteral dialectName = "test";
614 static ArrayOfEnumsAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<SimpleEnumAttr> value);
615 static constexpr ::llvm::StringLiteral getMnemonic() {
616 return {"array_of_enums"};
617 }
618
619 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
620 void print(::mlir::AsmPrinter &odsPrinter) const;
621 ::llvm::ArrayRef<SimpleEnumAttr> getValue() const;
622};
623namespace detail {
624struct TestCustomAnchorAttrStorage;
625} // namespace detail
626class TestCustomAnchorAttr : public ::mlir::Attribute::AttrBase<TestCustomAnchorAttr, ::mlir::Attribute, detail::TestCustomAnchorAttrStorage> {
627public:
628 using Base::Base;
629 static constexpr ::llvm::StringLiteral name = "test.custom_anchor";
630 static constexpr ::llvm::StringLiteral dialectName = "test";
631 static TestCustomAnchorAttr get(::mlir::MLIRContext *context, int a, std::optional<int> b);
632 static constexpr ::llvm::StringLiteral getMnemonic() {
633 return {"custom_anchor"};
634 }
635
636 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
637 void print(::mlir::AsmPrinter &odsPrinter) const;
638 int getA() const;
639 std::optional<int> getB() const;
640};
641namespace detail {
642struct IteratorTypeAttrStorage;
643} // namespace detail
644class IteratorTypeAttr : public ::mlir::Attribute::AttrBase<IteratorTypeAttr, ::mlir::Attribute, detail::IteratorTypeAttrStorage> {
645public:
646 using Base::Base;
647 static constexpr ::llvm::StringLiteral name = "test.iterator_type";
648 static constexpr ::llvm::StringLiteral dialectName = "test";
649 static IteratorTypeAttr get(::mlir::MLIRContext *context, ::mlir::utils::IteratorType value);
650 static constexpr ::llvm::StringLiteral getMnemonic() {
651 return {"iterator_type"};
652 }
653
654 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
655 void print(::mlir::AsmPrinter &odsPrinter) const;
656 ::mlir::utils::IteratorType getValue() const;
657};
658namespace detail {
659struct TestCopyCountAttrStorage;
660} // namespace detail
661class TestCopyCountAttr : public ::mlir::Attribute::AttrBase<TestCopyCountAttr, ::mlir::Attribute, detail::TestCopyCountAttrStorage> {
662public:
663 using Base::Base;
664 static constexpr ::llvm::StringLiteral name = "test.copy_count";
665 static constexpr ::llvm::StringLiteral dialectName = "test";
666 static TestCopyCountAttr get(::mlir::MLIRContext *context, CopyCount copy_count);
667 static constexpr ::llvm::StringLiteral getMnemonic() {
668 return {"copy_count"};
669 }
670
671 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
672 void print(::mlir::AsmPrinter &odsPrinter) const;
673 const CopyCount &getCopyCount() const;
674};
675namespace detail {
676struct TestConditionalAliasAttrStorage;
677} // namespace detail
678class TestConditionalAliasAttr : public ::mlir::Attribute::AttrBase<TestConditionalAliasAttr, ::mlir::Attribute, detail::TestConditionalAliasAttrStorage> {
679public:
680 using Base::Base;
681 static constexpr ::llvm::StringLiteral name = "test.conditional_alias";
682 static constexpr ::llvm::StringLiteral dialectName = "test";
683 static TestConditionalAliasAttr get(::mlir::MLIRContext *context, mlir::StringAttr value);
684 static constexpr ::llvm::StringLiteral getMnemonic() {
685 return {"conditional_alias"};
686 }
687
688 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
689 void print(::mlir::AsmPrinter &odsPrinter) const;
690 mlir::StringAttr getValue() const;
691};
692namespace detail {
693struct TestCustomFloatAttrStorage;
694} // namespace detail
695class TestCustomFloatAttr : public ::mlir::Attribute::AttrBase<TestCustomFloatAttr, ::mlir::Attribute, detail::TestCustomFloatAttrStorage> {
696public:
697 using Base::Base;
698 static constexpr ::llvm::StringLiteral name = "test.custom_float";
699 static constexpr ::llvm::StringLiteral dialectName = "test";
700 static TestCustomFloatAttr get(::mlir::MLIRContext *context, mlir::StringAttr type_str, ::llvm::APFloat value);
701 static constexpr ::llvm::StringLiteral getMnemonic() {
702 return {"custom_float"};
703 }
704
705 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
706 void print(::mlir::AsmPrinter &odsPrinter) const;
707 mlir::StringAttr getTypeStr() const;
708 ::llvm::APFloat getValue() const;
709};
710namespace detail {
711struct TestCustomStructAttrStorage;
712} // namespace detail
713class TestCustomStructAttr : public ::mlir::Attribute::AttrBase<TestCustomStructAttr, ::mlir::Attribute, detail::TestCustomStructAttrStorage> {
714public:
715 using Base::Base;
716 static constexpr ::llvm::StringLiteral name = "test.custom_struct";
717 static constexpr ::llvm::StringLiteral dialectName = "test";
718 static TestCustomStructAttr get(::mlir::MLIRContext *context, mlir::StringAttr type_str, int64_t value, mlir::ArrayAttr opt_value);
719 static constexpr ::llvm::StringLiteral getMnemonic() {
720 return {"custom_struct"};
721 }
722
723 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
724 void print(::mlir::AsmPrinter &odsPrinter) const;
725 mlir::StringAttr getTypeStr() const;
726 int64_t getValue() const;
727 mlir::ArrayAttr getOptValue() const;
728};
729namespace detail {
730struct TestConstMemorySpaceAttrStorage;
731} // namespace detail
732class TestConstMemorySpaceAttr : public ::mlir::Attribute::AttrBase<TestConstMemorySpaceAttr, ::mlir::Attribute, detail::TestConstMemorySpaceAttrStorage, ::mlir::ptr::MemorySpaceAttrInterface::Trait> {
733public:
734 using Base::Base;
735 static constexpr ::llvm::StringLiteral name = "test.const_memory_space";
736 static constexpr ::llvm::StringLiteral dialectName = "test";
737 static TestConstMemorySpaceAttr get(::mlir::MLIRContext *context, unsigned addressSpace);
738 static constexpr ::llvm::StringLiteral getMnemonic() {
739 return {"const_memory_space"};
740 }
741
742 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
743 void print(::mlir::AsmPrinter &odsPrinter) const;
744 unsigned getAddressSpace() const;
745 bool isValidLoad(::mlir::Type type, ::mlir::ptr::AtomicOrdering ordering, ::mlir::IntegerAttr alignment, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const;
746 bool isValidStore(::mlir::Type type, ::mlir::ptr::AtomicOrdering ordering, ::mlir::IntegerAttr alignment, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const;
747 bool isValidAtomicOp(::mlir::ptr::AtomicBinOp op, ::mlir::Type type, ::mlir::ptr::AtomicOrdering ordering, ::mlir::IntegerAttr alignment, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const;
748 bool isValidAtomicXchg(::mlir::Type type, ::mlir::ptr::AtomicOrdering successOrdering, ::mlir::ptr::AtomicOrdering failureOrdering, ::mlir::IntegerAttr alignment, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const;
749 bool isValidAddrSpaceCast(::mlir::Type tgt, ::mlir::Type src, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const;
750 bool isValidPtrIntCast(::mlir::Type intLikeTy, ::mlir::Type ptrLikeTy, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const;
751};
752namespace detail {
753struct TestCustomLocationAttrStorage;
754} // namespace detail
755class TestCustomLocationAttr : public ::mlir::Attribute::AttrBase<TestCustomLocationAttr, ::mlir::LocationAttr, detail::TestCustomLocationAttrStorage, ::mlir::AttributeTrait::IsLocation> {
756public:
757 using Base::Base;
758 static constexpr ::llvm::StringLiteral name = "test.custom_location";
759 static constexpr ::llvm::StringLiteral dialectName = "test";
760 static TestCustomLocationAttr get(::mlir::MLIRContext *context, mlir::StringAttr file, unsigned line);
761 static constexpr ::llvm::StringLiteral getMnemonic() {
762 return {"custom_location"};
763 }
764
765 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
766 void print(::mlir::AsmPrinter &odsPrinter) const;
767 mlir::StringAttr getFile() const;
768 unsigned getLine() const;
769};
770namespace detail {
771struct TestOpAsmAttrInterfaceAttrStorage;
772} // namespace detail
773class TestOpAsmAttrInterfaceAttr : public ::mlir::Attribute::AttrBase<TestOpAsmAttrInterfaceAttr, ::mlir::Attribute, detail::TestOpAsmAttrInterfaceAttrStorage, ::mlir::OpAsmAttrInterface::Trait> {
774public:
775 using Base::Base;
776 static constexpr ::llvm::StringLiteral name = "test.op_asm_attr_interface";
777 static constexpr ::llvm::StringLiteral dialectName = "test";
778 static TestOpAsmAttrInterfaceAttr get(::mlir::MLIRContext *context, mlir::StringAttr value);
779 static constexpr ::llvm::StringLiteral getMnemonic() {
780 return {"op_asm_attr_interface"};
781 }
782
783 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
784 void print(::mlir::AsmPrinter &odsPrinter) const;
785 mlir::StringAttr getValue() const;
786 ::mlir::OpAsmAliasResult getAlias(::llvm::raw_ostream&os) const;
787};
788namespace detail {
789struct TestOpAsmAttrInterfaceTablegenDefaultAttrStorage;
790} // namespace detail
791class TestOpAsmAttrInterfaceTablegenDefaultAttr : public ::mlir::Attribute::AttrBase<TestOpAsmAttrInterfaceTablegenDefaultAttr, ::mlir::Attribute, detail::TestOpAsmAttrInterfaceTablegenDefaultAttrStorage, ::mlir::OpAsmAttrInterface::Trait> {
792public:
793 using Base::Base;
794 static constexpr ::llvm::StringLiteral name = "test.op_asm_attr_interface_tablegen_default";
795 static constexpr ::llvm::StringLiteral dialectName = "test";
796 static TestOpAsmAttrInterfaceTablegenDefaultAttr get(::mlir::MLIRContext *context, mlir::StringAttr value);
797 static constexpr ::llvm::StringLiteral getMnemonic() {
798 return {"op_asm_attr_interface_tablegen_default"};
799 }
800
801 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
802 void print(::mlir::AsmPrinter &odsPrinter) const;
803 mlir::StringAttr getValue() const;
804 ::mlir::OpAsmAliasResult getAlias(::llvm::raw_ostream &os) const;
805};
806namespace detail {
807struct SlashAttrStorage;
808} // namespace detail
809class SlashAttr : public ::mlir::Attribute::AttrBase<SlashAttr, ::mlir::Attribute, detail::SlashAttrStorage> {
810public:
811 using Base::Base;
812 static constexpr ::llvm::StringLiteral name = "test.slash_attr";
813 static constexpr ::llvm::StringLiteral dialectName = "test";
814 static SlashAttr get(::mlir::MLIRContext *context, int lhs, int rhs);
815 static constexpr ::llvm::StringLiteral getMnemonic() {
816 return {"slash_attr"};
817 }
818
819 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
820 void print(::mlir::AsmPrinter &odsPrinter) const;
821 int getLhs() const;
822 int getRhs() const;
823};
824namespace detail {
825struct TestCustomStorageCtorAttrAttrStorage;
826} // namespace detail
827class TestCustomStorageCtorAttrAttr : public ::mlir::Attribute::AttrBase<TestCustomStorageCtorAttrAttr, ::mlir::Attribute, detail::TestCustomStorageCtorAttrAttrStorage> {
828public:
829 using Base::Base;
830 static constexpr ::llvm::StringLiteral name = "test.custom_storage_ctor_attr";
831 static constexpr ::llvm::StringLiteral dialectName = "test";
832 static TestCustomStorageCtorAttrAttr get(::mlir::MLIRContext *context, int value);
833 static constexpr ::llvm::StringLiteral getMnemonic() {
834 return {"custom_storage_ctor_attr"};
835 }
836
837 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
838 void print(::mlir::AsmPrinter &odsPrinter) const;
839 int getValue() const;
840};
841namespace detail {
842struct TestEnumAttrStorage;
843} // namespace detail
844class TestEnumAttr : public ::mlir::Attribute::AttrBase<TestEnumAttr, ::mlir::Attribute, detail::TestEnumAttrStorage> {
845public:
846 using Base::Base;
847 static constexpr ::llvm::StringLiteral name = "test.enum";
848 static constexpr ::llvm::StringLiteral dialectName = "test";
849 static TestEnumAttr get(::mlir::MLIRContext *context, test::TestEnum value);
850 static constexpr ::llvm::StringLiteral getMnemonic() {
851 return {"enum"};
852 }
853
854 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
855 void print(::mlir::AsmPrinter &odsPrinter) const;
856 test::TestEnum getValue() const;
857};
858namespace detail {
859struct TestBitEnumAttrStorage;
860} // namespace detail
861class TestBitEnumAttr : public ::mlir::Attribute::AttrBase<TestBitEnumAttr, ::mlir::Attribute, detail::TestBitEnumAttrStorage> {
862public:
863 using Base::Base;
864 static constexpr ::llvm::StringLiteral name = "test.bit_enum";
865 static constexpr ::llvm::StringLiteral dialectName = "test";
866 static TestBitEnumAttr get(::mlir::MLIRContext *context, test::TestBitEnum value);
867 static constexpr ::llvm::StringLiteral getMnemonic() {
868 return {"bit_enum"};
869 }
870
871 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
872 void print(::mlir::AsmPrinter &odsPrinter) const;
873 test::TestBitEnum getValue() const;
874};
875namespace detail {
876struct TestBitEnumVerticalBarAttrStorage;
877} // namespace detail
878class TestBitEnumVerticalBarAttr : public ::mlir::Attribute::AttrBase<TestBitEnumVerticalBarAttr, ::mlir::Attribute, detail::TestBitEnumVerticalBarAttrStorage> {
879public:
880 using Base::Base;
881 static constexpr ::llvm::StringLiteral name = "test.bit_enum_vbar";
882 static constexpr ::llvm::StringLiteral dialectName = "test";
883 static TestBitEnumVerticalBarAttr get(::mlir::MLIRContext *context, test::TestBitEnumVerticalBar value);
884 static constexpr ::llvm::StringLiteral getMnemonic() {
885 return {"bit_enum_vbar"};
886 }
887
888 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
889 void print(::mlir::AsmPrinter &odsPrinter) const;
890 test::TestBitEnumVerticalBar getValue() const;
891};
892} // namespace test
893MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::SimpleAAttr)
894MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundAAttr)
895MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundAttrNestedAttr)
896MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::AttrWithSelfTypeParamAttr)
897MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::AttrWithTypeBuilderAttr)
898MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::AttrWithTraitAttr)
899MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestDecimalShapeAttr)
900MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestI64ElementsAttr)
901MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestSubElementsAccessAttr)
902MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundNestedInnerAttr)
903MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundNestedOuterAttr)
904MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundNestedOuterQualAttr)
905MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithFormatAttr)
906MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithOptionalSignedAttr)
907MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithOptionalUnsignedAttr)
908MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithOptionalEnumAttr)
909MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrUglyAttr)
910MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrParamsAttr)
911MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithTypeParamAttr)
912MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrSelfTypeParameterFormatAttr)
913MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrSelfTypeParameterStructFormatAttr)
914MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestOverrideBuilderAttr)
915MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestExtern1DI64ElementsAttr)
916MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::ArrayOfUglyAttrsAttr)
917MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::ArrayOfIntsAttr)
918MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::SimpleEnumAttr)
919MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::ArrayOfEnumsAttr)
920MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomAnchorAttr)
921MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::IteratorTypeAttr)
922MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCopyCountAttr)
923MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestConditionalAliasAttr)
924MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomFloatAttr)
925MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomStructAttr)
926MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestConstMemorySpaceAttr)
927MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomLocationAttr)
928MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestOpAsmAttrInterfaceAttr)
929MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestOpAsmAttrInterfaceTablegenDefaultAttr)
930MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::SlashAttr)
931MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomStorageCtorAttrAttr)
932MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestEnumAttr)
933MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestBitEnumAttr)
934MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestBitEnumVerticalBarAttr)
935
936#endif // GET_ATTRDEF_CLASSES
937
938

source code of llvm_build/tools/mlir/test/lib/Dialect/Test/TestAttrDefs.h.inc