diff --git a/clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td b/clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td index 902d6535ff717..ec461cab961c7 100644 --- a/clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td +++ b/clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td @@ -31,6 +31,12 @@ class CIR_ConfinedType preds, string summary = ""> : Type]>, summary, type.cppType>; +//===----------------------------------------------------------------------===// +// Bool Type predicates +//===----------------------------------------------------------------------===// + +def CIR_AnyBoolType : CIR_TypeBase<"::cir::BoolType", "boolean type">; + //===----------------------------------------------------------------------===// // IntType predicates //===----------------------------------------------------------------------===// @@ -193,4 +199,16 @@ def IntegerVector : Type< // Any Integer or Vector of Integer Constraints def CIR_AnyIntOrVecOfInt: AnyTypeOf<[CIR_AnyIntType, IntegerVector]>; +//===----------------------------------------------------------------------===// +// Scalar Type predicates +//===----------------------------------------------------------------------===// + +defvar CIR_ScalarTypes = [ + CIR_AnyBoolType, CIR_AnyIntType, CIR_AnyFloatType, CIR_AnyPtrType +]; + +def CIR_AnyScalarType : AnyTypeOf { + let cppFunctionName = "isScalarType"; +} + #endif // CLANG_CIR_DIALECT_IR_CIRTYPECONSTRAINTS_TD