13#include "llvm/ADT/TypeSwitch.h"
19static mlir::ParseResult
24 [&]() {
return parser.
parseType(types.emplace_back()); });
30 llvm::interleaveComma(types, printer);
34#define GET_TYPEDEF_CLASSES
35#include "mlir/Dialect/SMT/IR/SMTTypes.cpp.inc"
37void SMTDialect::registerTypes() {
39#define GET_TYPEDEF_LIST
40#include "mlir/Dialect/SMT/IR/SMTTypes.cpp.inc"
49 return isa<BoolType, BitVectorType, ArrayType, IntType, SortType,
61 return emitError() <<
"bit-vector must have at least a width of one";
72 return emitError() <<
"domain must be any SMT value type";
74 return emitError() <<
"range must be any SMT value type";
86 return emitError() <<
"domain types must be any non-function SMT type";
88 return emitError() <<
"range type must be any non-function SMT type";
98 StringAttr identifier,
102 <<
"sort parameter types must be any non-function SMT type";
static void printDomainTypes(mlir::AsmPrinter &printer, llvm::ArrayRef< mlir::Type > types)
static mlir::ParseResult parseDomainTypes(mlir::AsmParser &parser, llvm::SmallVectorImpl< mlir::Type > &types)
This base class exposes generic asm parser hooks, usable across the various derived parsers.
@ Paren
Parens surrounding zero or more operands.
virtual ParseResult parseCommaSeparatedList(Delimiter delimiter, function_ref< ParseResult()> parseElementFn, StringRef contextMessage=StringRef())=0
Parse a list of comma-separated items with an optional delimiter.
virtual ParseResult parseType(Type &result)=0
Parse a type.
This base class exposes generic asm printer hooks, usable across the various derived printers.
This class represents a diagnostic that is inflight and set to be reported.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
bool isAnySMTValueType(mlir::Type type)
Returns whether the given type is an SMT value type.
bool isAnyNonFuncSMTValueType(mlir::Type type)
Returns whether the given type is an SMT value type (excluding functions).
Include the generated interface declarations.
InFlightDiagnostic emitError(Location loc)
Utility method to emit an error message using this location.
llvm::function_ref< Fn > function_ref