diff options
author | Vladislav Vinogradov <vlad.vinogradov@intel.com> | 2021-02-27 15:21:00 +0300 |
---|---|---|
committer | Vladislav Vinogradov <vlad.vinogradov@intel.com> | 2021-03-17 16:44:24 +0300 |
commit | fee90542326bc1d81ba684bfc0a2cd21cb04e650 (patch) | |
tree | a264cd57123f92e3a4e30171d57d09bfbeaae9c6 /llvm/tools/llvm-objcopy/llvm-objcopy.cpp | |
parent | 2571a0936719b50facfee492ccbaf4916272be36 (diff) | |
download | llvm-fee90542326bc1d81ba684bfc0a2cd21cb04e650.zip llvm-fee90542326bc1d81ba684bfc0a2cd21cb04e650.tar.gz llvm-fee90542326bc1d81ba684bfc0a2cd21cb04e650.tar.bz2 |
[mlir][ODS] Support specialized Attribute class for Enums
Add a feature to `EnumAttr` definition to generate
specialized Attribute class for the particular enumeration.
This class will inherit `StringAttr` or `IntegerAttr` and
will override `classof` and `getValue` methods.
With this class the enumeration predicate can be checked with simple
RTTI calls (`isa`, `dyn_cast`) and it will return the typed enumeration
directly instead of raw string/integer.
Based on the following discussion:
https://llvm.discourse.group/t/rfc-add-enum-attribute-decorator-class/2252
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D97836
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
0 files changed, 0 insertions, 0 deletions