1 // RUN: mlir-tblgen -gen-type-constraint-decls -I %S/../../include %s | FileCheck %s --check-prefix=DECL
2 // RUN: mlir-tblgen -gen-type-constraint-defs -I %S/../../include %s | FileCheck %s --check-prefix=DEF
4 include "mlir/IR/CommonTypeConstraints.td"
6 def DummyConstraint : AnyTypeOf<[AnyInteger, Index, AnyFloat]> {
7 let cppFunctionName = "isValidDummy";
10 // DECL: bool isValidDummy(::mlir::Type type);
12 // DEF: bool isValidDummy(::mlir::Type type) {
13 // DEF: return (((::llvm::isa<::mlir::IntegerType>(type))) || ((::llvm::isa<::mlir::IndexType>(type))) || ((::llvm::isa<::mlir::FloatType>(type))));