diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-01-07 18:18:32 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-01-07 18:18:32 +0000 |
commit | 84ed600154d48d75f204795410aae808d7e4b7bd (patch) | |
tree | 623965f74b68ffd6056aef73dba80e96a99c6fab /lib/Frontend/RewriteObjC.cpp | |
parent | 7d0eed6ed767afc5d849144915ef42a3108d473c (diff) |
Fix rewriting of ivars. Fixes radar 7490331.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/RewriteObjC.cpp')
-rw-r--r-- | lib/Frontend/RewriteObjC.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp index 7e35475007..44fa263cff 100644 --- a/lib/Frontend/RewriteObjC.cpp +++ b/lib/Frontend/RewriteObjC.cpp @@ -1183,10 +1183,11 @@ Stmt *RewriteObjC::RewritePropertyGetter(ObjCPropertyRefExpr *PropRefExpr) { Stmt *RewriteObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV, SourceLocation OrigStart) { ObjCIvarDecl *D = IV->getDecl(); + const Expr *BaseExpr = IV->getBase(); if (CurMethodDef) { - if (const PointerType *pType = IV->getBase()->getType()->getAs<PointerType>()) { + if (IV->isArrow()) { ObjCInterfaceType *iFaceDecl = - dyn_cast<ObjCInterfaceType>(pType->getPointeeType()); + dyn_cast<ObjCInterfaceType>(BaseExpr->getType()->getPointeeType()); // lookup which class implements the instance variable. ObjCInterfaceDecl *clsDeclared = 0; iFaceDecl->getDecl()->lookupInstanceVariable(D->getIdentifier(), |