diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-18 20:50:23 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-18 20:50:23 +0000 |
commit | 154440e6a8fa6ac5bca395876d79b530b39a2c1c (patch) | |
tree | 0e2cb0ba45e69bfb532ce6002a3f1a91780a9c42 /lib/CodeGen | |
parent | f53b4433abb7a3bc14c0329d3175cbc291280137 (diff) |
Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 9 | ||||
-rw-r--r-- | lib/CodeGen/CGExprAgg.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/CGExprComplex.cpp | 3 | ||||
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 3 | ||||
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/CGValue.h | 9 | ||||
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 2 |
7 files changed, 22 insertions, 15 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 1078bacde5..3f07909ea5 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -227,8 +227,8 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) { return EmitObjCIvarRefLValue(cast<ObjCIvarRefExpr>(E)); case Expr::ObjCPropertyRefExprClass: return EmitObjCPropertyRefLValue(cast<ObjCPropertyRefExpr>(E)); - case Expr::ObjCKVCRefExprClass: - return EmitObjCKVCRefLValue(cast<ObjCKVCRefExpr>(E)); + case Expr::ObjCImplctSetterGetterRefExprClass: + return EmitObjCKVCRefLValue(cast<ObjCImplctSetterGetterRefExpr>(E)); case Expr::ObjCSuperExprClass: return EmitObjCSuperExprLValue(cast<ObjCSuperExpr>(E)); @@ -1026,7 +1026,7 @@ LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) { isUnion = true; CVRQualifiers = PTy->getPointeeType().getCVRQualifiers(); } else if (isa<ObjCPropertyRefExpr>(BaseExpr) || - isa<ObjCKVCRefExpr>(BaseExpr)) { + isa<ObjCImplctSetterGetterRefExpr>(BaseExpr)) { RValue RV = EmitObjCPropertyGet(BaseExpr); BaseValue = RV.getAggregateAddr(); if (BaseExpr->getType()->isUnionType()) @@ -1341,7 +1341,8 @@ CodeGenFunction::EmitObjCPropertyRefLValue(const ObjCPropertyRefExpr *E) { } LValue -CodeGenFunction::EmitObjCKVCRefLValue(const ObjCKVCRefExpr *E) { +CodeGenFunction::EmitObjCKVCRefLValue( + const ObjCImplctSetterGetterRefExpr *E) { // This is a special l-value that just issues sends when we load or // store through it. return LValue::MakeKVCRef(E, E->getType().getCVRQualifiers()); diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index 68341a12b1..1c1fc9b451 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -99,7 +99,7 @@ public: EmitAggLoadOfLValue(E); } void VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E); - void VisitObjCKVCRefExpr(ObjCKVCRefExpr *E); + void VisitObjCImplctSetterGetterRefExpr(ObjCImplctSetterGetterRefExpr *E); void VisitConditionalOperator(const ConditionalOperator *CO); void VisitChooseExpr(const ChooseExpr *CE); @@ -208,7 +208,8 @@ void AggExprEmitter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) { EmitFinalDestCopy(E, RV); } -void AggExprEmitter::VisitObjCKVCRefExpr(ObjCKVCRefExpr *E) { +void AggExprEmitter::VisitObjCImplctSetterGetterRefExpr( + ObjCImplctSetterGetterRefExpr *E) { RValue RV = CGF.EmitObjCPropertyGet(E); EmitFinalDestCopy(E, RV); } diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index f8e125a7bb..b23588cfce 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -120,7 +120,8 @@ public: ComplexPairTy VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) { return EmitLoadOfLValue(E); } - ComplexPairTy VisitObjCKVCRefExpr(ObjCKVCRefExpr *E) { + ComplexPairTy VisitObjCImplctSetterGetterRefExpr( + ObjCImplctSetterGetterRefExpr *E) { return EmitLoadOfLValue(E); } ComplexPairTy VisitObjCMessageExpr(ObjCMessageExpr *E) { diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 37d2995142..5650ed7425 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -158,7 +158,8 @@ public: Value *VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) { return EmitLoadOfLValue(E); } - Value *VisitObjCKVCRefExpr(ObjCKVCRefExpr *E) { + Value *VisitObjCImplctSetterGetterRefExpr( + ObjCImplctSetterGetterRefExpr *E) { return EmitLoadOfLValue(E); } Value *VisitObjCMessageExpr(ObjCMessageExpr *E) { diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index c9c9b0aa47..8a942d6537 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -337,7 +337,8 @@ RValue CodeGenFunction::EmitObjCPropertyGet(const Expr *Exp) { EmitScalarExpr(E->getBase()), false, CallArgList()); } else { - const ObjCKVCRefExpr *KE = cast<ObjCKVCRefExpr>(Exp); + const ObjCImplctSetterGetterRefExpr *KE = + cast<ObjCImplctSetterGetterRefExpr>(Exp); Selector S = KE->getGetterMethod()->getSelector(); llvm::Value *Receiver; if (KE->getClassProp()) { @@ -388,7 +389,8 @@ void CodeGenFunction::EmitObjCPropertySet(const Expr *Exp, CGM.getObjCRuntime().GenerateMessageSend(*this, getContext().VoidTy, S, EmitScalarExpr(E->getBase()), false, Args); - } else if (const ObjCKVCRefExpr *E = dyn_cast<ObjCKVCRefExpr>(Exp)) { + } else if (const ObjCImplctSetterGetterRefExpr *E = + dyn_cast<ObjCImplctSetterGetterRefExpr>(Exp)) { Selector S = E->getSetterMethod()->getSelector(); CallArgList Args; llvm::Value *Receiver; diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h index 9e937085a9..15020e9157 100644 --- a/lib/CodeGen/CGValue.h +++ b/lib/CodeGen/CGValue.h @@ -24,7 +24,7 @@ namespace llvm { namespace clang { class ObjCPropertyRefExpr; - class ObjCKVCRefExpr; + class ObjCImplctSetterGetterRefExpr; namespace CodeGen { @@ -143,7 +143,7 @@ class LValue { // Obj-C property reference expression const ObjCPropertyRefExpr *PropertyRefExpr; // ObjC 'implicit' property reference expression - const ObjCKVCRefExpr *KVCRefExpr; + const ObjCImplctSetterGetterRefExpr *KVCRefExpr; }; bool Volatile:1; @@ -251,7 +251,7 @@ public: } // 'implicit' property ref lvalue - const ObjCKVCRefExpr *getKVCRefExpr() const { + const ObjCImplctSetterGetterRefExpr *getKVCRefExpr() const { assert(isKVCRef()); return KVCRefExpr; } @@ -313,7 +313,8 @@ public: return R; } - static LValue MakeKVCRef(const ObjCKVCRefExpr *E, unsigned Qualifiers) { + static LValue MakeKVCRef(const ObjCImplctSetterGetterRefExpr *E, + unsigned Qualifiers) { LValue R; R.LVType = KVCRef; R.KVCRefExpr = E; diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index e2aba1b2ba..b2b02c1728 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -805,7 +805,7 @@ public: LValue EmitObjCMessageExprLValue(const ObjCMessageExpr *E); LValue EmitObjCIvarRefLValue(const ObjCIvarRefExpr *E); LValue EmitObjCPropertyRefLValue(const ObjCPropertyRefExpr *E); - LValue EmitObjCKVCRefLValue(const ObjCKVCRefExpr *E); + LValue EmitObjCKVCRefLValue(const ObjCImplctSetterGetterRefExpr *E); LValue EmitObjCSuperExprLValue(const ObjCSuperExpr *E); LValue EmitStmtExprLValue(const StmtExpr *E); |