Added comment to Steve's patch to clarify the case.

llvm-svn: 61144
This commit is contained in:
Fariborz Jahanian 2008-12-17 18:25:24 +00:00
parent 29f390b507
commit 7ca027a101
1 changed files with 3 additions and 0 deletions

View File

@ -369,6 +369,9 @@ void ObjCInterfaceDecl::addInstanceVariablesToClass(ObjCIvarDecl **ivars,
///
FieldDecl *ObjCInterfaceDecl::lookupFieldDeclForIvar(ASTContext &Context,
const ObjCIvarDecl *ivar) {
/* When a super class's ivar is referenced in the subclass method with no ivar
of its own, record for the sub-class is not built yet. Build it lazily
here. */
if (!RecordForDecl)
addRecordToClass(Context);
assert(RecordForDecl && "lookupFieldDeclForIvar no storage for class");