Added assert to the rewrite.

llvm-svn: 94584
This commit is contained in:
Fariborz Jahanian 2010-01-26 20:37:44 +00:00
parent 345ec3166e
commit f0ed69cb5b
1 changed files with 1 additions and 0 deletions

View File

@ -1216,6 +1216,7 @@ Stmt *RewriteObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV,
if (BaseExpr->getType()->isObjCObjectPointerType()) { if (BaseExpr->getType()->isObjCObjectPointerType()) {
ObjCInterfaceType *iFaceDecl = ObjCInterfaceType *iFaceDecl =
dyn_cast<ObjCInterfaceType>(BaseExpr->getType()->getPointeeType()); dyn_cast<ObjCInterfaceType>(BaseExpr->getType()->getPointeeType());
assert(iFaceDecl && "RewriteObjCIvarRefExpr - iFaceDecl is null");
// lookup which class implements the instance variable. // lookup which class implements the instance variable.
ObjCInterfaceDecl *clsDeclared = 0; ObjCInterfaceDecl *clsDeclared = 0;
iFaceDecl->getDecl()->lookupInstanceVariable(D->getIdentifier(), iFaceDecl->getDecl()->lookupInstanceVariable(D->getIdentifier(),