LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
AnalysisPassEnums.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Enum Utility Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: AnalysisPasses.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10namespace llzk {
11// Specifies the stream to which the pass prints.
12enum class OutputStream : uint32_t {
13 Outs = 1,
14 Errs = 2,
15 Dbgs = 3,
16};
17
18::std::optional<OutputStream> symbolizeOutputStream(uint32_t);
19::llvm::StringRef stringifyOutputStream(OutputStream);
20::std::optional<OutputStream> symbolizeOutputStream(::llvm::StringRef);
21inline constexpr unsigned getMaxEnumValForOutputStream() {
22 return 3;
23}
24
25
26inline ::llvm::StringRef stringifyEnum(OutputStream enumValue) {
27 return stringifyOutputStream(enumValue);
28}
29
30template <typename EnumType>
31::std::optional<EnumType> symbolizeEnum(::llvm::StringRef);
32
33template <>
34inline ::std::optional<OutputStream> symbolizeEnum<OutputStream>(::llvm::StringRef str) {
35 return symbolizeOutputStream(str);
36}
37} // namespace llzk
38
39namespace mlir {
40template <typename T, typename>
42
43template<>
45 template <typename ParserT>
46 static FailureOr<::llzk::OutputStream> parse(ParserT &parser) {
47 // Parse the keyword/string containing the enum.
48 std::string enumKeyword;
49 auto loc = parser.getCurrentLocation();
50 if (failed(parser.parseOptionalKeywordOrString(&enumKeyword)))
51 return parser.emitError(loc, "expected keyword for Specifies the stream to which the pass prints.");
52
53 // Symbolize the keyword.
54 if (::std::optional<::llzk::OutputStream> attr = ::llzk::symbolizeEnum<::llzk::OutputStream>(enumKeyword))
55 return *attr;
56 return parser.emitError(loc, "invalid Specifies the stream to which the pass prints. specification: ") << enumKeyword;
57 }
58};
59} // namespace mlir
60
61namespace llvm {
62inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, ::llzk::OutputStream value) {
63 auto valueStr = stringifyEnum(value);
64 return p << valueStr;
65}
66} // namespace llvm
67
68namespace llvm {
69template<> struct DenseMapInfo<::llzk::OutputStream> {
70 using StorageInfo = ::llvm::DenseMapInfo<uint32_t>;
71
72 static inline ::llzk::OutputStream getEmptyKey() {
73 return static_cast<::llzk::OutputStream>(StorageInfo::getEmptyKey());
74 }
75
76 static inline ::llzk::OutputStream getTombstoneKey() {
77 return static_cast<::llzk::OutputStream>(StorageInfo::getTombstoneKey());
78 }
79
80 static unsigned getHashValue(const ::llzk::OutputStream &val) {
81 return StorageInfo::getHashValue(static_cast<uint32_t>(val));
82 }
83
84 static bool isEqual(const ::llzk::OutputStream &lhs, const ::llzk::OutputStream &rhs) {
85 return lhs == rhs;
86 }
87};
88}
89
inline ::llvm::raw_ostream & operator<<(::llvm::raw_ostream &p, ::llzk::OutputStream value)
inline ::llvm::StringRef stringifyEnum(OutputStream enumValue)
constexpr unsigned getMaxEnumValForOutputStream()
::std::optional< OutputStream > symbolizeOutputStream(::llvm::StringRef str)
::std::optional< EnumType > symbolizeEnum(::llvm::StringRef)
::llvm::StringRef stringifyOutputStream(OutputStream val)
inline ::std::optional< OutputStream > symbolizeEnum< OutputStream >(::llvm::StringRef str)
static unsigned getHashValue(const ::llzk::OutputStream &val)
static inline ::llzk::OutputStream getTombstoneKey()
static inline ::llzk::OutputStream getEmptyKey()
static bool isEqual(const ::llzk::OutputStream &lhs, const ::llzk::OutputStream &rhs)
::llvm::DenseMapInfo< uint32_t > StorageInfo
static FailureOr<::llzk::OutputStream > parse(ParserT &parser)