llvm-project/mlir/unittests
Alex Zinenko fdc496a3d3 [mlir] EnumsGen: dissociate string form of integer enum from C++ symbol name
Summary:
In some cases, one may want to use different names for C++ symbol of an
enumerand from its string representation. In particular, in the LLVM dialect
for, e.g., Linkage, we would like to preserve the same enumerand names as LLVM
API and the same textual IR form as LLVM IR, yet the two are different
(CamelCase vs snake_case with additional limitations on not being a C++
keyword).

Modify EnumAttrCaseInfo in OpBase.td to include both the integer value and its
string representation. By default, this representation is the same as C++
symbol name. Introduce new IntStrAttrCaseBase that allows one to use different
names. Exercise it for LLVM Dialect Linkage attribute. Other attributes will
follow as separate changes.

Differential Revision: https://reviews.llvm.org/D73362
2020-01-30 17:04:00 +01:00
..
ADT Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
Dialect Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
IR Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
Pass Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
Quantizer/Support Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
SDBM Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
Support Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
TableGen [mlir] EnumsGen: dissociate string form of integer enum from C++ symbol name 2020-01-30 17:04:00 +01:00
CMakeLists.txt [mlir] Fix indexed_accessor_range to properly forward the derived class. 2020-01-03 13:30:18 -08:00