@@ -3429,12 +3429,14 @@ class FunctionProtoType : public FunctionType, public llvm::FoldingSetNode {
34293429 // / Extra information about a function prototype.
34303430 struct ExtProtoInfo {
34313431 ExtProtoInfo ()
3432- : Variadic(false ), HasTrailingReturn(false ), numTypeVars(0 ),
3432+ : Variadic(false ), HasTrailingReturn(false ), numTypeVars(0 ),
3433+ GenericFunction (false ), ItypeGenericFunction(false ),
34333434 TypeQuals(0 ), RefQualifier(RQ_None), ExtParameterInfos(nullptr ),
34343435 ParamAnnots(nullptr ), ReturnAnnots() {}
34353436
34363437 ExtProtoInfo (CallingConv CC )
3437- : ExtInfo(CC ), Variadic(false ), HasTrailingReturn(false ), numTypeVars(0 ),
3438+ : ExtInfo(CC ), Variadic(false ), HasTrailingReturn(false ), numTypeVars(0 ),
3439+ GenericFunction(false ), ItypeGenericFunction(false ),
34383440 TypeQuals(0 ), RefQualifier(RQ_None), ExtParameterInfos(nullptr ),
34393441 ParamAnnots(nullptr ), ReturnAnnots() {}
34403442
@@ -3448,6 +3450,8 @@ class FunctionProtoType : public FunctionType, public llvm::FoldingSetNode {
34483450 bool Variadic : 1 ;
34493451 bool HasTrailingReturn : 1 ;
34503452 unsigned numTypeVars : 15 ;
3453+ bool GenericFunction : 1 ;
3454+ bool ItypeGenericFunction : 1 ;
34513455 unsigned char TypeQuals;
34523456 RefQualifierKind RefQualifier;
34533457 ExceptionSpecInfo ExceptionSpec;
@@ -3487,6 +3491,9 @@ class FunctionProtoType : public FunctionType, public llvm::FoldingSetNode {
34873491 // / Whether the function is variadic.
34883492 unsigned Variadic : 1 ;
34893493
3494+ bool GenericFunction : 1 ;
3495+ bool ItypeGenericFunction : 1 ;
3496+
34903497 // / Whether this function has a trailing return type.
34913498 unsigned HasTrailingReturn : 1 ;
34923499
@@ -3553,6 +3560,9 @@ class FunctionProtoType : public FunctionType, public llvm::FoldingSetNode {
35533560 return param_type_begin ()[i];
35543561 }
35553562 unsigned getNumTypeVars () const { return NumTypeVars; }
3563+ bool isGenericFunction () const { return GenericFunction; }
3564+ bool isItypeGenericFunction () const { return ItypeGenericFunction; }
3565+
35563566 ArrayRef<QualType> getParamTypes () const {
35573567 return llvm::makeArrayRef (param_type_begin (), param_type_end ());
35583568 }
@@ -3588,6 +3598,8 @@ class FunctionProtoType : public FunctionType, public llvm::FoldingSetNode {
35883598 EPI .ParamAnnots = hasParamAnnots () ? param_annots_begin () : nullptr ;
35893599 EPI .ReturnAnnots = getReturnAnnots ();
35903600 EPI .numTypeVars = getNumTypeVars ();
3601+ EPI .GenericFunction = isGenericFunction ();
3602+ EPI .ItypeGenericFunction = isItypeGenericFunction ();
35913603 return EPI ;
35923604 }
35933605
@@ -3835,10 +3847,11 @@ class TypeVariableType : public Type, public llvm::FoldingSetNode {
38353847 // prototype scope depth, this keeps track of the depth of forany scope.
38363848 unsigned int depth;
38373849 unsigned int index;
3850+ bool isBoundsInterfaceType;
38383851protected:
3839- TypeVariableType (unsigned int inDepth, unsigned int inIndex)
3852+ TypeVariableType (unsigned int inDepth, unsigned int inIndex, bool inBoundsInterface )
38403853 : Type(TypeVariable, QualType(), false , false , false , false ),
3841- depth (inDepth), index(inIndex) { }
3854+ depth (inDepth), index(inIndex), isBoundsInterfaceType(inBoundsInterface) { }
38423855 friend class ASTContext ;
38433856public:
38443857 bool isSugared (void ) const { return false ; }
@@ -3847,6 +3860,12 @@ class TypeVariableType : public Type, public llvm::FoldingSetNode {
38473860 void SetDepth (unsigned int i) { depth = i; }
38483861 unsigned int GetIndex (void ) const { return index; }
38493862 void SetIndex (unsigned int i) { index = i; }
3863+ void SetInBoundsInterface (bool isInBoundsInterface) {
3864+ isBoundsInterfaceType = isInBoundsInterface;
3865+ }
3866+ bool IsBoundsInterfaceType () const {
3867+ return isBoundsInterfaceType;
3868+ }
38503869
38513870 void Profile (llvm::FoldingSetNodeID &ID ) {
38523871 Profile (ID , depth, index);
0 commit comments