Lines Matching refs:Protocols
1971 /// CollectInheritedProtocols - Collect all protocols in current class and
1974 llvm::SmallPtrSet<ObjCProtocolDecl*, 8> &Protocols) {
1979 CollectInheritedProtocols(Proto, Protocols);
1984 CollectInheritedProtocols(Cat, Protocols);
1988 CollectInheritedProtocols(SD, Protocols);
1992 for (auto *Proto : OC->protocols()) {
1993 CollectInheritedProtocols(Proto, Protocols);
1997 if (!Protocols.insert(
2001 for (auto *Proto : OP->protocols())
2002 CollectInheritedProtocols(Proto, Protocols);
3645 /// CmpProtocolNames - Comparison predicate for sorting protocols
3652 static bool areSortedAndUniqued(ObjCProtocolDecl * const *Protocols,
3656 if (Protocols[0]->getCanonicalDecl() != Protocols[0])
3660 if (CmpProtocolNames(&Protocols[i - 1], &Protocols[i]) >= 0 ||
3661 Protocols[i]->getCanonicalDecl() != Protocols[i])
3667 SortAndUniqueProtocols(SmallVectorImpl<ObjCProtocolDecl *> &Protocols) {
3668 // Sort protocols, keyed by name.
3669 llvm::array_pod_sort(Protocols.begin(), Protocols.end(), CmpProtocolNames);
3672 for (ObjCProtocolDecl *&P : Protocols)
3676 auto ProtocolsEnd = std::unique(Protocols.begin(), Protocols.end());
3677 Protocols.erase(ProtocolsEnd, Protocols.end());
3681 ObjCProtocolDecl * const *Protocols,
3684 llvm::makeArrayRef(Protocols, NumProtocols),
3691 ArrayRef<ObjCProtocolDecl *> protocols,
3693 // If the base type is an interface and there aren't any protocols or
3695 if (typeArgs.empty() && protocols.empty() && !isKindOf &&
3701 ObjCObjectTypeImpl::Profile(ID, baseType, typeArgs, protocols, isKindOf);
3716 // sorted-and-uniqued list of protocols and the type arguments
3724 bool protocolsSorted = areSortedAndUniqued(protocols.data(),
3725 protocols.size());
3742 canonProtocolsVec.append(protocols.begin(), protocols.end());
3746 canonProtocols = protocols;
3758 size += protocols.size() * sizeof(ObjCProtocolDecl *);
3761 new (mem) ObjCObjectTypeImpl(canonical, baseType, typeArgs, protocols,
3769 /// ObjCObjectAdoptsQTypeProtocols - Checks that protocols in IC's
3770 /// protocol list adopt all protocols in QT's qualified-id protocol
3788 /// QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in
3789 /// QT's qualified-id protocol list adopt all protocols in IDecl's list
3790 /// of protocols.
3866 /// specified ObjC interface decl. The list of protocols is optional.
6695 for (auto *PI : rProto->protocols())
6746 // see if static class implements all of id's protocols, directly or
6760 // see if static class implements all of id's protocols, directly or
6774 // see if static class implements all of id's protocols, directly or
6799 // see if static class implements all of id's protocols, directly or
6801 // First, lhs protocols in the qualifier list must be found, direct
6814 // Static class's protocols, or its super class or category protocols
6946 /// Comparison routine for Objective-C protocols to be used with
6955 /// of protocols inherited from two distinct objective-c pointer objects with
6971 // Add all of the protocols for the LHS.
6979 // Also add the protocols associated with the LHS interface.
6990 // Also add the protocols associated with the RHS interface.
6999 // Compute the set of protocols that is implied by either the common type or
7000 // the protocols within the intersection.
7004 // Remove any implied protocols from the list of inherited protocols.
7015 // Sort the remaining protocols by name.
7119 // Compute the intersection of protocols.
7120 SmallVector<ObjCProtocolDecl *, 8> Protocols;
7122 Protocols);
7123 if (!Protocols.empty())
7129 Result = getObjCObjectType(Result, LHSTypeArgs, Protocols,
7168 // Compute the intersection of protocols.
7169 SmallVector<ObjCProtocolDecl *, 8> Protocols;
7171 Protocols);
7172 if (!Protocols.empty())
7177 Result = getObjCObjectType(Result, RHSTypeArgs, Protocols,
7209 // satisfied by the RHS (i.e., the RHS has a superset of the protocols in the
7213 // ; i.e., SuperClass may implement at least one of the protocols
7222 // If there is no protocols associated with RHS, it is not a match.