15 lines · plain
1// RUN: mlir-tblgen -gen-type-constraint-decls -I %S/../../include %s | FileCheck %s --check-prefix=DECL2// RUN: mlir-tblgen -gen-type-constraint-defs -I %S/../../include %s | FileCheck %s --check-prefix=DEF3 4include "mlir/IR/CommonTypeConstraints.td"5 6def DummyConstraint : AnyTypeOf<[AnyInteger, Index, AnyFloat]> {7 let cppFunctionName = "isValidDummy";8}9 10// DECL: bool isValidDummy(::mlir::Type type);11 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))));14// DEF: }15