@@ -1095,6 +1095,68 @@ class SILBoxTypeWithLayoutTypeRef final : public TypeRef {
10951095 }
10961096};
10971097
1098+ class IntegerTypeRef final : public TypeRef {
1099+ intptr_t Value;
1100+
1101+ static TypeRefID Profile (const intptr_t &Value) {
1102+ TypeRefID ID;
1103+ ID.addInteger ((uint64_t )Value);
1104+ return ID;
1105+ }
1106+
1107+ public:
1108+ IntegerTypeRef (const intptr_t &Value)
1109+ : TypeRef(TypeRefKind::Integer), Value(Value) {}
1110+
1111+ template <typename Allocator>
1112+ static const IntegerTypeRef *create (Allocator &A, intptr_t Value) {
1113+ FIND_OR_CREATE_TYPEREF (A, IntegerTypeRef, Value);
1114+ }
1115+
1116+ const intptr_t &getValue () const {
1117+ return Value;
1118+ }
1119+
1120+ static bool classof (const TypeRef *TR) {
1121+ return TR->getKind () == TypeRefKind::Integer;
1122+ }
1123+ };
1124+
1125+ class BuiltinFixedArrayTypeRef final : public TypeRef {
1126+ const TypeRef *Size;
1127+ const TypeRef *Element;
1128+
1129+ static TypeRefID Profile (const TypeRef *Size, const TypeRef *Element) {
1130+ TypeRefID ID;
1131+ ID.addPointer (Size);
1132+ ID.addPointer (Element);
1133+ return ID;
1134+ }
1135+
1136+ public:
1137+ BuiltinFixedArrayTypeRef (const TypeRef *Size, const TypeRef *Element)
1138+ : TypeRef(TypeRefKind::BuiltinFixedArray), Size(Size), Element(Element) {}
1139+
1140+ template <typename Allocator>
1141+ static const BuiltinFixedArrayTypeRef *create (Allocator &A,
1142+ const TypeRef *Size,
1143+ const TypeRef *Element) {
1144+ FIND_OR_CREATE_TYPEREF (A, BuiltinFixedArrayTypeRef, Size, Element);
1145+ }
1146+
1147+ const TypeRef *getSizeType () const {
1148+ return Size;
1149+ }
1150+
1151+ const TypeRef *getElementType () const {
1152+ return Element;
1153+ }
1154+
1155+ static bool classof (const TypeRef *TR) {
1156+ return TR->getKind () == TypeRefKind::BuiltinFixedArray;
1157+ }
1158+ };
1159+
10981160template <typename ImplClass, typename RetTy = void , typename ... Args>
10991161class TypeRefVisitor {
11001162public:
0 commit comments