aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJeff Niu <jeff@modular.com>2022-09-01 09:30:54 -0700
committerJeff Niu <jeff@modular.com>2022-09-02 11:12:58 -0700
commit607f14d9605da801034e7119c297c3f58ebce603 (patch)
tree4c3b3fa049d0779cf98f020ddf2b82659dc8ab3e /clang/lib/Frontend/CompilerInvocation.cpp
parent041ec822421aae33f064d96a21607e550766dd4d (diff)
downloadllvm-607f14d9605da801034e7119c297c3f58ebce603.zip
llvm-607f14d9605da801034e7119c297c3f58ebce603.tar.gz
llvm-607f14d9605da801034e7119c297c3f58ebce603.tar.bz2
[mlir][ods] Add ArrayOfAttr for creating custom array attributes
`ArrayOfAttr` can be used to easily create an attribute that just contains an array of something. The elements can be other attributes, in which case the custom parsers and printers are invoked directly for nice syntax, or any C++ type that supports parsing and printing, either though custom `printer` and `parser` methods or `FieldParser`. An array of integers: ``` def ArrayOfInts : ArrayOfAttr<Test_Dialect, "ArrayOfInts", "array_of_ints", "int32_t">; ``` When embedded in an op's assembly format, it will look like ``` foo.ints value = [1, 2, 3] ``` An array of enums, when embedded in an op's assembly format, will look like: ``` foo.enums value = [first, second, last] ``` Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D133131
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions