const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
void setClassInterface(ObjCInterfaceDecl *IDecl) { ClassInterface = IDecl; }
- void setReferencedProtocolList(ObjCProtocolDecl **List, unsigned NumRPs);
-
- void setCatReferencedProtocols(unsigned idx, ObjCProtocolDecl *OID) {
- assert((idx < NumReferencedProtocols) && "index out of range");
- ReferencedProtocols[idx] = OID;
- }
+ /// addReferencedProtocols - Set the list of protocols that this interface
+ /// implements.
+ void addReferencedProtocols(ObjCProtocolDecl **List, unsigned NumRPs);
ObjCProtocolDecl **getReferencedProtocols() const {
return ReferencedProtocols;
AtEndLoc = endLoc;
}
-void ObjCCategoryDecl::setReferencedProtocolList(ObjCProtocolDecl **List,
- unsigned NumRPs) {
+void ObjCCategoryDecl::addReferencedProtocols(ObjCProtocolDecl **List,
+ unsigned NumRPs) {
assert(NumReferencedProtocols == 0 && "Protocol list already set");
if (NumRPs == 0) return;
RefProtocols.push_back(RefPDecl);
}
if (!RefProtocols.empty())
- CDecl->setReferencedProtocolList(&RefProtocols[0], RefProtocols.size());
+ CDecl->addReferencedProtocols(&RefProtocols[0], RefProtocols.size());
}
CDecl->setLocEnd(EndProtoLoc);
return CDecl;