summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-09-01 17:02:21 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-09-01 17:02:21 +0000
commit1a50477385095bcbff8f62b53314c75a5a411122 (patch)
tree6e04dc919865d0e330c2f2181c7ce323999ea986 /clang/lib
parent1543d133db58f89a8f55ed215b87f662acdcace3 (diff)
downloadbcm5719-llvm-1a50477385095bcbff8f62b53314c75a5a411122.tar.gz
bcm5719-llvm-1a50477385095bcbff8f62b53314c75a5a411122.zip
Fixed a property getter ir-gen crash.
llvm-svn: 80681
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp5
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp1
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 48326ee832e..43120156f8a 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -1026,8 +1026,9 @@ LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) {
if (PTy->getPointeeType()->isUnionType())
isUnion = true;
CVRQualifiers = PTy->getPointeeType().getCVRQualifiers();
- } else if (isa<ObjCPropertyRefExpr>(BaseExpr) ||
- isa<ObjCImplicitSetterGetterRefExpr>(BaseExpr)) {
+ } else if (isa<ObjCPropertyRefExpr>(BaseExpr->IgnoreParens()) ||
+ isa<ObjCImplicitSetterGetterRefExpr>(
+ BaseExpr->IgnoreParens())) {
RValue RV = EmitObjCPropertyGet(BaseExpr);
BaseValue = RV.getAggregateAddr();
if (BaseExpr->getType()->isUnionType())
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index 8c0c225d1ac..58999129813 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -327,6 +327,7 @@ RValue CodeGenFunction::EmitObjCSuperPropertyGet(const Expr *Exp,
}
RValue CodeGenFunction::EmitObjCPropertyGet(const Expr *Exp) {
+ Exp = Exp->IgnoreParens();
// FIXME: Split it into two separate routines.
if (const ObjCPropertyRefExpr *E = dyn_cast<ObjCPropertyRefExpr>(Exp)) {
Selector S = E->getProperty()->getGetterName();
OpenPOWER on IntegriCloud