@@ -43,6 +43,12 @@ class CIR_TypeSummaries<list<Type> types> {
4343 string value = !if(!eq(!size(types), 1), joined, "any of " # joined);
4444}
4545
46+ //===----------------------------------------------------------------------===//
47+ // Bool Type predicates
48+ //===----------------------------------------------------------------------===//
49+
50+ def CIR_AnyBoolType : CIR_TypeBase<"::cir::BoolType", "boolean type">;
51+
4652//===----------------------------------------------------------------------===//
4753// IntType predicates
4854//===----------------------------------------------------------------------===//
@@ -250,4 +256,23 @@ def CIR_PtrToExceptionInfoType
250256 BuildableType<"$_builder.getType<" # cppType # ">("
251257 "cir::ExceptionInfoType::get($_builder.getContext())))">;
252258
259+ //===----------------------------------------------------------------------===//
260+ // Data member type predicates
261+ //===----------------------------------------------------------------------===//
262+
263+ def CIR_AnyDataMemberType : CIR_TypeBase<"::cir::DataMemberType",
264+ "data member type">;
265+
266+ //===----------------------------------------------------------------------===//
267+ // Scalar Type predicates
268+ //===----------------------------------------------------------------------===//
269+
270+ defvar CIR_ScalarTypes = [
271+ CIR_AnyBoolType, CIR_AnyIntType, CIR_AnyFloatType, CIR_AnyPtrType,
272+ CIR_AnyDataMemberType
273+ ];
274+
275+ def CIR_AnyScalarType : AnyTypeOf<CIR_ScalarTypes, "cir scalar type"> {
276+ let cppFunctionName = "isScalarType";
277+ }
253278#endif // CLANG_CIR_DIALECT_IR_CIRTYPECONSTRAINTS_TD
0 commit comments