diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-14 16:04:05 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-14 16:04:05 +0000 |
commit | 8ac2d449820fd0df00fcbde5bf82165c1f49854d (patch) | |
tree | e776d338a9bd913adb7265519b84826f371b897b /lib/CodeGen/CGObjC.cpp | |
parent | 44270d6abff30415cdd873164823f48a45be7f8c (diff) |
Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 8abcbea5d0..7c2dfe8b23 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -534,7 +534,7 @@ RValue CodeGenFunction::EmitObjCPropertyGet(const Expr *Exp, // FIXME: Split it into two separate routines. if (const ObjCPropertyRefExpr *E = dyn_cast<ObjCPropertyRefExpr>(Exp)) { Selector S = E->getProperty()->getGetterName(); - if (isa<ObjCSuperExpr>(E->getBase())) + if (E->isSuperReceiver()) return EmitObjCSuperPropertyGet(E, S, Return); return CGM.getObjCRuntime(). GenerateMessageSend(*this, Return, Exp->getType(), S, @@ -548,7 +548,7 @@ RValue CodeGenFunction::EmitObjCPropertyGet(const Expr *Exp, if (KE->getInterfaceDecl()) { const ObjCInterfaceDecl *OID = KE->getInterfaceDecl(); Receiver = CGM.getObjCRuntime().GetClass(Builder, OID); - } else if (isa<ObjCSuperExpr>(KE->getBase())) + } else if (KE->isSuperReceiver()) return EmitObjCSuperPropertyGet(KE, S, Return); else Receiver = EmitScalarExpr(KE->getBase()); @@ -586,7 +586,7 @@ void CodeGenFunction::EmitObjCPropertySet(const Expr *Exp, // FIXME: Split it into two separate routines. if (const ObjCPropertyRefExpr *E = dyn_cast<ObjCPropertyRefExpr>(Exp)) { Selector S = E->getProperty()->getSetterName(); - if (isa<ObjCSuperExpr>(E->getBase())) { + if (E->isSuperReceiver()) { EmitObjCSuperPropertySet(E, S, Src); return; } @@ -605,7 +605,7 @@ void CodeGenFunction::EmitObjCPropertySet(const Expr *Exp, if (E->getInterfaceDecl()) { const ObjCInterfaceDecl *OID = E->getInterfaceDecl(); Receiver = CGM.getObjCRuntime().GetClass(Builder, OID); - } else if (isa<ObjCSuperExpr>(E->getBase())) { + } else if (E->isSuperReceiver()) { EmitObjCSuperPropertySet(E, S, Src); return; } else |