Home | History | Annotate | Download | only in AST

Lines Matching defs:Protocols

1786 /// CollectInheritedProtocols - Collect all protocols in current class and
1789 llvm::SmallPtrSet<ObjCProtocolDecl*, 8> &Protocols) {
1796 Protocols.insert(Proto->getCanonicalDecl());
1799 Protocols.insert((*P)->getCanonicalDecl());
1800 CollectInheritedProtocols(*P, Protocols);
1809 CollectInheritedProtocols(*Cat, Protocols);
1814 CollectInheritedProtocols(SD, Protocols);
1821 Protocols.insert(Proto->getCanonicalDecl());
1824 CollectInheritedProtocols(*P, Protocols);
1830 Protocols.insert(Proto->getCanonicalDecl());
1833 CollectInheritedProtocols(*P, Protocols);
3414 /// CmpProtocolNames - Comparison predicate for sorting protocols
3421 static bool areSortedAndUniqued(ObjCProtocolDecl * const *Protocols,
3425 if (Protocols[0]->getCanonicalDecl() != Protocols[0])
3429 if (!CmpProtocolNames(Protocols[i-1], Protocols[i]) ||
3430 Protocols[i]->getCanonicalDecl() != Protocols[i])
3435 static void SortAndUniqueProtocols(ObjCProtocolDecl **Protocols,
3437 ObjCProtocolDecl **ProtocolsEnd = Protocols+NumProtocols;
3439 // Sort protocols, keyed by name.
3440 std::sort(Protocols, Protocols+NumProtocols, CmpProtocolNames);
3444 Protocols[I] = Protocols[I]->getCanonicalDecl();
3447 ProtocolsEnd = std::unique(Protocols, ProtocolsEnd);
3448 NumProtocols = ProtocolsEnd-Protocols;
3452 ObjCProtocolDecl * const *Protocols,
3454 // If the base type is an interface and there aren't any protocols
3461 ObjCObjectTypeImpl::Profile(ID, BaseType, Protocols, NumProtocols);
3467 // a sorted-and-uniqued list of protocols.
3469 bool ProtocolsSorted = areSortedAndUniqued(Protocols, NumProtocols);
3472 SmallVector<ObjCProtocolDecl*, 8> Sorted(Protocols,
3473 Protocols + NumProtocols);
3481 Protocols, NumProtocols);
3492 new (Mem) ObjCObjectTypeImpl(Canonical, BaseType, Protocols, NumProtocols);
3530 /// specified ObjC interface decl. The list of protocols is optional.
6485 // see if static class implements all of id's protocols, directly or
6501 // see if static class implements all of id's protocols, directly or
6518 // see if static class implements all of id's protocols, directly or
6545 // see if static class implements all of id's protocols, directly or
6547 // First, lhs protocols in the qualifier list must be found, direct
6562 // Static class's protocols, or its super class or category protocols
6662 /// of protocols inherited from two distinct objective-c pointer objects.
6724 SmallVector<ObjCProtocolDecl *, 8> Protocols;
6725 getIntersectionOfProtocols(*this, Lptr, Rptr, Protocols);
6728 if (!Protocols.empty())
6729 Result = getObjCObjectType(Result, Protocols.data(), Protocols.size());
6748 // RHS must have a superset of the protocols in the LHS. If the LHS is not
6763 // ; i.e., SuperClass may implement at least one of the protocols
6768 // If super class has no protocols, it is not a match.
6814 // The RHS implements all protocols listed on the LHS.