• Home
  • Raw
  • Download

Lines Matching refs:enumName

40 static void emitEnumClass(const Record &enumDef, StringRef enumName,  in emitEnumClass()  argument
45 os << "enum class " << enumName; in emitEnumClass()
63 static void emitDenseMapInfo(StringRef enumName, std::string underlyingType, in emitDenseMapInfo() argument
66 std::string(formatv("{0}::{1}", cppNamespace, enumName)); in emitDenseMapInfo()
137 StringRef enumName = enumAttr.getEnumClassName(); in emitOperators() local
139 os << formatv("inline {0} operator|({0} lhs, {0} rhs) {{\n", enumName) in emitOperators()
142 enumName, underlyingType) in emitOperators()
144 os << formatv("inline {0} operator&({0} lhs, {0} rhs) {{\n", enumName) in emitOperators()
147 enumName, underlyingType) in emitOperators()
152 enumName, underlyingType) in emitOperators()
158 StringRef enumName = enumAttr.getEnumClassName(); in emitSymToStrFnForIntEnum() local
163 os << formatv("{2} {1}({0} val) {{\n", enumName, symToStrFnName, in emitSymToStrFnForIntEnum()
169 os << formatv(" case {0}::{1}: return \"{2}\";\n", enumName, in emitSymToStrFnForIntEnum()
179 StringRef enumName = enumAttr.getEnumClassName(); in emitSymToStrFnForBitEnum() local
186 os << formatv("{2} {1}({0} symbol) {{\n", enumName, symToStrFnName, in emitSymToStrFnForBitEnum()
213 StringRef enumName = enumAttr.getEnumClassName(); in emitStrToSymFnForIntEnum() local
218 enumName, strToSymFnName); in emitStrToSymFnForIntEnum()
220 enumName); in emitStrToSymFnForIntEnum()
224 os << formatv(" .Case(\"{1}\", {0}::{2})\n", enumName, str, in emitStrToSymFnForIntEnum()
233 StringRef enumName = enumAttr.getEnumClassName(); in emitStrToSymFnForBitEnum() local
241 enumName, strToSymFnName); in emitStrToSymFnForBitEnum()
246 os << formatv(" if (str == \"{1}\") return {0}::{2};\n\n", enumName, in emitStrToSymFnForBitEnum()
272 os << formatv(" return static_cast<{0}>(val);\n", enumName); in emitStrToSymFnForBitEnum()
279 StringRef enumName = enumAttr.getEnumClassName(); in emitUnderlyingToSymFnForIntEnum() local
291 os << formatv("::llvm::Optional<{0}> {1}({2} value) {{\n", enumName, in emitUnderlyingToSymFnForIntEnum()
299 os << formatv(" case {0}: return {1}::{2};\n", value, enumName, in emitUnderlyingToSymFnForIntEnum()
310 StringRef enumName = enumAttr.getEnumClassName(); in emitUnderlyingToSymFnForBitEnum() local
316 os << formatv("::llvm::Optional<{0}> {1}({2} value) {{\n", enumName, in emitUnderlyingToSymFnForBitEnum()
320 os << formatv(" if (value == 0) return {0}::{1};\n\n", enumName, in emitUnderlyingToSymFnForBitEnum()
330 os << formatv(" return static_cast<{0}>(value);\n", enumName); in emitUnderlyingToSymFnForBitEnum()
336 StringRef enumName = enumAttr.getEnumClassName(); in emitEnumDecl() local
353 emitEnumClass(enumDef, enumName, underlyingType, description, enumerants, os); in emitEnumDecl()
360 "::llvm::Optional<{0}> {1}({2});\n", enumName, underlyingToSymFnName, in emitEnumDecl()
363 os << formatv("{2} {1}({0});\n", enumName, symToStrFnName, symToStrFnRetType); in emitEnumDecl()
364 os << formatv("::llvm::Optional<{0}> {1}(::llvm::StringRef);\n", enumName, in emitEnumDecl()
380 os << formatv(stringifyEnumStr, symToStrFnRetType, enumName, symToStrFnName); in emitEnumDecl()
393 os << formatv(symbolizeEnumStr, enumName, strToSymFnName); in emitEnumDecl()
399 emitDenseMapInfo(enumName, underlyingType, cppNamespace, os); in emitEnumDecl()