@@ -419,6 +419,9 @@ class ASTContext : public RefCountedBase<ASTContext> {
419419 // / The identifier '__builtin_common_type'.
420420 mutable IdentifierInfo *BuiltinCommonTypeName = nullptr ;
421421
422+ // / The identifier '__builtin_common_reference'.
423+ mutable IdentifierInfo *BuiltinCommonReferenceName = nullptr ;
424+
422425 QualType ObjCConstantStringType;
423426 mutable RecordDecl *CFConstantStringTagDecl = nullptr ;
424427 mutable TypedefDecl *CFConstantStringTypeDecl = nullptr ;
@@ -627,6 +630,8 @@ class ASTContext : public RefCountedBase<ASTContext> {
627630 mutable BuiltinTemplateDecl *MakeIntegerSeqDecl = nullptr ;
628631 mutable BuiltinTemplateDecl *TypePackElementDecl = nullptr ;
629632 mutable BuiltinTemplateDecl *BuiltinCommonTypeDecl = nullptr ;
633+ mutable BuiltinTemplateDecl *BuiltinCommonReferenceDecl = nullptr ;
634+ mutable CVRefQualifyingTemplateDecl *CVRefQualifyingDecls[12 ] = {};
630635
631636 // / The associated SourceManager object.
632637 SourceManager &SourceMgr;
@@ -1155,6 +1160,8 @@ class ASTContext : public RefCountedBase<ASTContext> {
11551160 BuiltinTemplateDecl *getMakeIntegerSeqDecl () const ;
11561161 BuiltinTemplateDecl *getTypePackElementDecl () const ;
11571162 BuiltinTemplateDecl *getBuiltinCommonTypeDecl () const ;
1163+ BuiltinTemplateDecl *getBuiltinCommonReferenceDecl () const ;
1164+ CVRefQualifyingTemplateDecl *getCVRefQualifyingAliasDecl (QualType From) const ;
11581165
11591166 // Builtin Types.
11601167 CanQualType VoidTy;
@@ -2072,6 +2079,12 @@ class ASTContext : public RefCountedBase<ASTContext> {
20722079 return BuiltinCommonTypeName;
20732080 }
20742081
2082+ IdentifierInfo *getBuiltinCommonReferenceName () const {
2083+ if (!BuiltinCommonReferenceName)
2084+ BuiltinCommonReferenceName = &Idents.get (" __builtin_common_reference" );
2085+ return BuiltinCommonReferenceName;
2086+ }
2087+
20752088 // / Retrieve the Objective-C "instancetype" type, if already known;
20762089 // / otherwise, returns a NULL type;
20772090 QualType getObjCInstanceType () {
0 commit comments