#include "FormatGen.h"
#include "mlir/TableGen/Attribute.h"
#include "mlir/TableGen/Format.h"
#include "mlir/TableGen/GenInfo.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/TableGenBackend.h"
formatv;
isDigit;
PrintFatalError;
raw_ostream;
Record;
RecordKeeper;
StringRef;
Attribute;
EnumAttr;
EnumAttrCase;
FmtContext;
tgfmt;
static std::string makeIdentifier(StringRef str) { … }
static void emitEnumClass(const Record &enumDef, StringRef enumName,
StringRef underlyingType, StringRef description,
const std::vector<EnumAttrCase> &enumerants,
raw_ostream &os) { … }
static void emitParserPrinter(const EnumAttr &enumAttr, StringRef qualName,
StringRef cppNamespace, raw_ostream &os) { … }
static void emitDenseMapInfo(StringRef qualName, std::string underlyingType,
StringRef cppNamespace, raw_ostream &os) { … }
static void emitMaxValueFn(const Record &enumDef, raw_ostream &os) { … }
static std::optional<EnumAttrCase>
getAllBitsUnsetCase(llvm::ArrayRef<EnumAttrCase> cases) { … }
static void emitOperators(const Record &enumDef, raw_ostream &os) { … }
static void emitSymToStrFnForIntEnum(const Record &enumDef, raw_ostream &os) { … }
static void emitSymToStrFnForBitEnum(const Record &enumDef, raw_ostream &os) { … }
static void emitStrToSymFnForIntEnum(const Record &enumDef, raw_ostream &os) { … }
static void emitStrToSymFnForBitEnum(const Record &enumDef, raw_ostream &os) { … }
static void emitUnderlyingToSymFnForIntEnum(const Record &enumDef,
raw_ostream &os) { … }
static void emitSpecializedAttrDef(const Record &enumDef, raw_ostream &os) { … }
static void emitUnderlyingToSymFnForBitEnum(const Record &enumDef,
raw_ostream &os) { … }
static void emitEnumDecl(const Record &enumDef, raw_ostream &os) { … }
static bool emitEnumDecls(const RecordKeeper &recordKeeper, raw_ostream &os) { … }
static void emitEnumDef(const Record &enumDef, raw_ostream &os) { … }
static bool emitEnumDefs(const RecordKeeper &recordKeeper, raw_ostream &os) { … }
static mlir::GenRegistration
genEnumDecls("gen-enum-decls", "Generate enum utility declarations",
[](const RecordKeeper &records, raw_ostream &os) { … });
static mlir::GenRegistration
genEnumDefs("gen-enum-defs", "Generate enum utility definitions",
[](const RecordKeeper &records, raw_ostream &os) { … });