llvm/tools/mlir/unittests/TableGen/EnumsGenTest.h.inc

/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|*                                                                            *|
|* Enum Utility Declarations                                                  *|
|*                                                                            *|
|* Automatically generated file, do not edit!                                 *|
|* From: enums.td                                                             *|
|*                                                                            *|
\*===----------------------------------------------------------------------===*/

// A 64-bit test enum
enum class BitEnum64_Test : uint64_t {};

::std::optional<BitEnum64_Test> symbolizeBitEnum64_Test(uint64_t);
std::string stringifyBitEnum64_Test(BitEnum64_Test);
::std::optional<BitEnum64_Test> symbolizeBitEnum64_Test(::llvm::StringRef);

inline constexpr BitEnum64_Test operator|(BitEnum64_Test a, BitEnum64_Test b) {}
inline constexpr BitEnum64_Test operator&(BitEnum64_Test a, BitEnum64_Test b) {}
inline constexpr BitEnum64_Test operator^(BitEnum64_Test a, BitEnum64_Test b) {}
inline constexpr BitEnum64_Test operator~(BitEnum64_Test bits) {}
inline constexpr bool bitEnumContainsAll(BitEnum64_Test bits, BitEnum64_Test bit) {}
inline constexpr bool bitEnumContainsAny(BitEnum64_Test bits, BitEnum64_Test bit) {}
inline constexpr BitEnum64_Test bitEnumClear(BitEnum64_Test bits, BitEnum64_Test bit) {}
inline constexpr BitEnum64_Test bitEnumSet(BitEnum64_Test bits, BitEnum64_Test bit, /*optional*/bool value=true) {}
  
inline std::string stringifyEnum(BitEnum64_Test enumValue) {}

template <typename EnumType>
::std::optional<EnumType> symbolizeEnum(::llvm::StringRef);

template <>
inline ::std::optional<BitEnum64_Test> symbolizeEnum<BitEnum64_Test>(::llvm::StringRef str) {}

class BitEnum64_TestAttr : public ::mlir::IntegerAttr {};

namespace mlir {
template <typename T, typename>
struct FieldParser;

template<>
struct FieldParser<::BitEnum64_Test, ::BitEnum64_Test> {};
} // namespace mlir

namespace llvm {
inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, ::BitEnum64_Test value) {}
} // namespace llvm

namespace llvm {
template<> struct DenseMapInfo<::BitEnum64_Test> {};
}

// test enum
enum class BitEnumPrimaryGroup : uint32_t {};

::std::optional<BitEnumPrimaryGroup> symbolizeBitEnumPrimaryGroup(uint32_t);
std::string stringifyBitEnumPrimaryGroup(BitEnumPrimaryGroup);
::std::optional<BitEnumPrimaryGroup> symbolizeBitEnumPrimaryGroup(::llvm::StringRef);

inline constexpr BitEnumPrimaryGroup operator|(BitEnumPrimaryGroup a, BitEnumPrimaryGroup b) {}
inline constexpr BitEnumPrimaryGroup operator&(BitEnumPrimaryGroup a, BitEnumPrimaryGroup b) {}
inline constexpr BitEnumPrimaryGroup operator^(BitEnumPrimaryGroup a, BitEnumPrimaryGroup b) {}
inline constexpr BitEnumPrimaryGroup operator~(BitEnumPrimaryGroup bits) {}
inline constexpr bool bitEnumContainsAll(BitEnumPrimaryGroup bits, BitEnumPrimaryGroup bit) {}
inline constexpr bool bitEnumContainsAny(BitEnumPrimaryGroup bits, BitEnumPrimaryGroup bit) {}
inline constexpr BitEnumPrimaryGroup bitEnumClear(BitEnumPrimaryGroup bits, BitEnumPrimaryGroup bit) {}
inline constexpr BitEnumPrimaryGroup bitEnumSet(BitEnumPrimaryGroup bits, BitEnumPrimaryGroup bit, /*optional*/bool value=true) {}
  
inline std::string stringifyEnum(BitEnumPrimaryGroup enumValue) {}

template <typename EnumType>
::std::optional<EnumType> symbolizeEnum(::llvm::StringRef);

template <>
inline ::std::optional<BitEnumPrimaryGroup> symbolizeEnum<BitEnumPrimaryGroup>(::llvm::StringRef str) {}

class BitEnumPrimaryGroupAttr : public ::mlir::IntegerAttr {};

namespace mlir {
template <typename T, typename>
struct FieldParser;

template<>
struct FieldParser<::BitEnumPrimaryGroup, ::BitEnumPrimaryGroup> {};
} // namespace mlir

namespace llvm {
inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, ::BitEnumPrimaryGroup value) {}
} // namespace llvm

namespace llvm {
template<> struct DenseMapInfo<::BitEnumPrimaryGroup> {};
}

// A test enum
enum class BitEnumWithGroup : uint32_t {};

::std::optional<BitEnumWithGroup> symbolizeBitEnumWithGroup(uint32_t);
std::string stringifyBitEnumWithGroup(BitEnumWithGroup);
::std::optional<BitEnumWithGroup> symbolizeBitEnumWithGroup(::llvm::StringRef);

inline constexpr BitEnumWithGroup operator|(BitEnumWithGroup a, BitEnumWithGroup b) {}
inline constexpr BitEnumWithGroup operator&(BitEnumWithGroup a, BitEnumWithGroup b) {}
inline constexpr BitEnumWithGroup operator^(BitEnumWithGroup a, BitEnumWithGroup b) {}
inline constexpr BitEnumWithGroup operator~(BitEnumWithGroup bits) {}
inline constexpr bool bitEnumContainsAll(BitEnumWithGroup bits, BitEnumWithGroup bit) {}
inline constexpr bool bitEnumContainsAny(BitEnumWithGroup bits, BitEnumWithGroup bit) {}
inline constexpr BitEnumWithGroup bitEnumClear(BitEnumWithGroup bits, BitEnumWithGroup bit) {}
inline constexpr BitEnumWithGroup bitEnumSet(BitEnumWithGroup bits, BitEnumWithGroup bit, /*optional*/bool value=true) {}
  
inline std::string stringifyEnum(BitEnumWithGroup enumValue) {}

template <typename EnumType>
::std::optional<EnumType> symbolizeEnum(::llvm::StringRef);

template <>
inline ::std::optional<BitEnumWithGroup> symbolizeEnum<BitEnumWithGroup>(::llvm::StringRef str) {}

class BitEnumWithGroupAttr : public ::mlir::IntegerAttr {};

namespace mlir {
template <typename T, typename>
struct FieldParser;

template<>
struct FieldParser<::BitEnumWithGroup, ::BitEnumWithGroup> {};
} // namespace mlir

namespace llvm {
inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, ::BitEnumWithGroup value) {}
} // namespace llvm

namespace llvm {
template<> struct DenseMapInfo<::BitEnumWithGroup> {};
}

// A test enum
enum class BitEnumWithNone : uint32_t {};

::std::optional<BitEnumWithNone> symbolizeBitEnumWithNone(uint32_t);
std::string stringifyBitEnumWithNone(BitEnumWithNone);
::std::optional<BitEnumWithNone> symbolizeBitEnumWithNone(::llvm::StringRef);

inline constexpr BitEnumWithNone operator|(BitEnumWithNone a, BitEnumWithNone b) {}
inline constexpr BitEnumWithNone operator&(BitEnumWithNone a, BitEnumWithNone b) {}
inline constexpr BitEnumWithNone operator^(BitEnumWithNone a, BitEnumWithNone b) {}
inline constexpr BitEnumWithNone operator~(BitEnumWithNone bits) {}
inline constexpr bool bitEnumContainsAll(BitEnumWithNone bits, BitEnumWithNone bit) {}
inline constexpr bool bitEnumContainsAny(BitEnumWithNone bits, BitEnumWithNone bit) {}
inline constexpr BitEnumWithNone bitEnumClear(BitEnumWithNone bits, BitEnumWithNone bit) {}
inline constexpr BitEnumWithNone bitEnumSet(BitEnumWithNone bits, BitEnumWithNone bit, /*optional*/bool value=true) {}
  
inline std::string stringifyEnum(BitEnumWithNone enumValue) {}

template <typename EnumType>
::std::optional<EnumType> symbolizeEnum(::llvm::StringRef);

template <>
inline ::std::optional<BitEnumWithNone> symbolizeEnum<BitEnumWithNone>(::llvm::StringRef str) {}

class BitEnumWithNoneAttr : public ::mlir::IntegerAttr {};

namespace mlir {
template <typename T, typename>
struct FieldParser;

template<>
struct FieldParser<::BitEnumWithNone, ::BitEnumWithNone> {};
} // namespace mlir

namespace llvm {
inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, ::BitEnumWithNone value) {}
} // namespace llvm

namespace llvm {
template<> struct DenseMapInfo<::BitEnumWithNone> {};
}

// A test enum
enum class BitEnumWithoutNone : uint32_t {};

::std::optional<BitEnumWithoutNone> symbolizeBitEnumWithoutNone(uint32_t);
std::string stringifyBitEnumWithoutNone(BitEnumWithoutNone);
::std::optional<BitEnumWithoutNone> symbolizeBitEnumWithoutNone(::llvm::StringRef);

inline constexpr BitEnumWithoutNone operator|(BitEnumWithoutNone a, BitEnumWithoutNone b) {}
inline constexpr BitEnumWithoutNone operator&(BitEnumWithoutNone a, BitEnumWithoutNone b) {}
inline constexpr BitEnumWithoutNone operator^(BitEnumWithoutNone a, BitEnumWithoutNone b) {}
inline constexpr BitEnumWithoutNone operator~(BitEnumWithoutNone bits) {}
inline constexpr bool bitEnumContainsAll(BitEnumWithoutNone bits, BitEnumWithoutNone bit) {}
inline constexpr bool bitEnumContainsAny(BitEnumWithoutNone bits, BitEnumWithoutNone bit) {}
inline constexpr BitEnumWithoutNone bitEnumClear(BitEnumWithoutNone bits, BitEnumWithoutNone bit) {}
inline constexpr BitEnumWithoutNone bitEnumSet(BitEnumWithoutNone bits, BitEnumWithoutNone bit, /*optional*/bool value=true) {}
  
inline std::string stringifyEnum(BitEnumWithoutNone enumValue) {}

template <typename EnumType>
::std::optional<EnumType> symbolizeEnum(::llvm::StringRef);

template <>
inline ::std::optional<BitEnumWithoutNone> symbolizeEnum<BitEnumWithoutNone>(::llvm::StringRef str) {}

class BitEnumWithoutNoneAttr : public ::mlir::IntegerAttr {};

namespace mlir {
template <typename T, typename>
struct FieldParser;

template<>
struct FieldParser<::BitEnumWithoutNone, ::BitEnumWithoutNone> {};
} // namespace mlir

namespace llvm {
inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, ::BitEnumWithoutNone value) {}
} // namespace llvm

namespace llvm {
template<> struct DenseMapInfo<::BitEnumWithoutNone> {};
}

namespace Outer {
namespace Inner {
// A test enum
enum class FooEnum : uint32_t {};

::std::optional<FooEnum> symbolizeFooEnum(uint32_t);
::llvm::StringRef ConvertToString(FooEnum);
::std::optional<FooEnum> ConvertToEnum(::llvm::StringRef);
inline constexpr unsigned getMaxEnumValForFooEnum() {}


inline ::llvm::StringRef stringifyEnum(FooEnum enumValue) {}

template <typename EnumType>
::std::optional<EnumType> symbolizeEnum(::llvm::StringRef);

template <>
inline ::std::optional<FooEnum> symbolizeEnum<FooEnum>(::llvm::StringRef str) {}

class FooEnumAttr : public ::mlir::IntegerAttr {};
} // namespace Inner
} // namespace Outer

namespace mlir {
template <typename T, typename>
struct FieldParser;

template<>
struct FieldParser<Outer::Inner::FooEnum, Outer::Inner::FooEnum> {};
} // namespace mlir

namespace llvm {
inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, Outer::Inner::FooEnum value) {}
} // namespace llvm

namespace llvm {
template<> struct DenseMapInfo<Outer::Inner::FooEnum> {};
}

// A test enum
enum class I32Enum : uint32_t {};

::std::optional<I32Enum> symbolizeI32Enum(uint32_t);
::llvm::StringRef stringifyI32Enum(I32Enum);
::std::optional<I32Enum> symbolizeI32Enum(::llvm::StringRef);
inline constexpr unsigned getMaxEnumValForI32Enum() {}


inline ::llvm::StringRef stringifyEnum(I32Enum enumValue) {}

template <typename EnumType>
::std::optional<EnumType> symbolizeEnum(::llvm::StringRef);

template <>
inline ::std::optional<I32Enum> symbolizeEnum<I32Enum>(::llvm::StringRef str) {}

class I32EnumAttr : public ::mlir::IntegerAttr {};

namespace mlir {
template <typename T, typename>
struct FieldParser;

template<>
struct FieldParser<::I32Enum, ::I32Enum> {};
} // namespace mlir

namespace llvm {
inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, ::I32Enum value) {}
} // namespace llvm

namespace llvm {
template<> struct DenseMapInfo<::I32Enum> {};
}

// A test enum
enum class PrettyIntEnum : uint32_t {};

::std::optional<PrettyIntEnum> symbolizePrettyIntEnum(uint32_t);
::llvm::StringRef stringifyPrettyIntEnum(PrettyIntEnum);
::std::optional<PrettyIntEnum> symbolizePrettyIntEnum(::llvm::StringRef);
inline constexpr unsigned getMaxEnumValForPrettyIntEnum() {}


inline ::llvm::StringRef stringifyEnum(PrettyIntEnum enumValue) {}

template <typename EnumType>
::std::optional<EnumType> symbolizeEnum(::llvm::StringRef);

template <>
inline ::std::optional<PrettyIntEnum> symbolizeEnum<PrettyIntEnum>(::llvm::StringRef str) {}

class PrettyIntEnumAttr : public ::mlir::IntegerAttr {};

namespace mlir {
template <typename T, typename>
struct FieldParser;

template<>
struct FieldParser<::PrettyIntEnum, ::PrettyIntEnum> {};
} // namespace mlir

namespace llvm {
inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, ::PrettyIntEnum value) {}
} // namespace llvm

namespace llvm {
template<> struct DenseMapInfo<::PrettyIntEnum> {};
}