}
ObjCCategoryDecl *FindCategoryDeclaration(IdentifierInfo *CategoryId) const;
- ObjCIvarDecl *FindIvarDeclaration(IdentifierInfo *IvarId) const;
typedef ObjCList<ObjCProtocolDecl>::iterator protocol_iterator;
protocol_iterator protocol_begin() const {return ReferencedProtocols.begin();}
return 0;
}
-/// FindIvarDeclaration - Find an Ivar declaration in this class given its
-/// name in 'IvarId'. On failure to find, return 0;
-///
-ObjCIvarDecl *
- ObjCInterfaceDecl::FindIvarDeclaration(IdentifierInfo *IvarId) const {
- for (ObjCInterfaceDecl::ivar_iterator IVI = ivar_begin(),
- IVE = ivar_end(); IVI != IVE; ++IVI) {
- ObjCIvarDecl* Ivar = (*IVI);
- if (Ivar->getIdentifier() == IvarId)
- return Ivar;
- }
- if (getSuperClass())
- return getSuperClass()->FindIvarDeclaration(IvarId);
- return 0;
-}
-
/// ObjCAddInstanceVariablesToClass - Inserts instance variables
/// into ObjCInterfaceDecl's fields.
///
IVE = ID->ivar_end(); IVI != IVE; ++IVI) {
ObjCIvarDecl* Ivar = (*IVI);
IdentifierInfo *II = Ivar->getIdentifier();
- ObjCIvarDecl* prevIvar = ID->getSuperClass()->FindIvarDeclaration(II);
+ ObjCIvarDecl* prevIvar = ID->getSuperClass()->lookupInstanceVariable(II);
if (prevIvar) {
Diag(Ivar->getLocation(), diag::err_duplicate_member) << II;
Diag(prevIvar->getLocation(), diag::note_previous_declaration);
if (!PropertyIvar)
PropertyIvar = PropertyId;
// Check that this is a previously declared 'ivar' in 'IDecl' interface
- Ivar = IDecl->FindIvarDeclaration(PropertyIvar);
+ Ivar = IDecl->lookupInstanceVariable(PropertyIvar);
if (!Ivar) {
Diag(PropertyLoc, diag::error_missing_property_ivar_decl) << PropertyId;
return 0;