FieldDecl *lookupFieldDeclForIvar(ASTContext &Context,
const ObjCIvarDecl *ivar);
+ const FieldDecl *lookupFieldDeclForIvar(ASTContext &Ctx,
+ const ObjCIvarDecl *IV) const {
+ return const_cast<ObjCInterfaceDecl*>(this)->lookupFieldDeclForIvar(Ctx,IV);
+ }
+
bool isForwardDecl() const { return ForwardDecl; }
void setForwardDecl(bool val) { ForwardDecl = val; }
void ASTContext::setFieldDecl(const ObjCInterfaceDecl *OI,
const ObjCIvarDecl *Ivar,
const ObjCIvarRefExpr *MRef) {
- FieldDecl *FD = (const_cast<ObjCInterfaceDecl *>(OI))->
- lookupFieldDeclForIvar(*this, Ivar);
- ASTFieldForIvarRef[MRef] = FD;
+ ASTFieldForIvarRef[MRef] = OI->lookupFieldDeclForIvar(*this, Ivar);
}
/// getASTObjcInterfaceLayout - Get or compute information about the layout of