diff options
author | John McCall <rjmccall@apple.com> | 2010-12-04 03:11:00 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-04 03:11:00 +0000 |
commit | 0692a32a3e97f74728cdaba8ba7986702b693faf (patch) | |
tree | 8076aeed5ba2bf8a4117f18215adf6f34050ea6f /clang/lib/CodeGen/CGExpr.cpp | |
parent | 87408b61af2c3ecd584b8ddd5ee0d25f9e6519b3 (diff) | |
download | bcm5719-llvm-0692a32a3e97f74728cdaba8ba7986702b693faf.tar.gz bcm5719-llvm-0692a32a3e97f74728cdaba8ba7986702b693faf.zip |
Test case for the l-value base only being evaluated once.
Also, move the l-value emission code into CGObjC.cpp and teach it, for
completeness, to store away self for a super send.
Also, inline the super cases for property gets and sets and make them
use the correct result type for implicit getter/setter calls.
llvm-svn: 120887
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 3b1a82e67f6..c98ee178420 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2068,22 +2068,6 @@ LValue CodeGenFunction::EmitObjCIvarRefLValue(const ObjCIvarRefExpr *E) { return LV; } -LValue -CodeGenFunction::EmitObjCPropertyRefLValue(const ObjCPropertyRefExpr *E) { - // This is a special l-value that just issues sends when we load or - // store through it. - - // For certain base kinds, we need to emit the base immediately. - llvm::Value *Base; - if (E->isSuperReceiver()) - Base = 0; - else if (E->isClassReceiver()) - Base = CGM.getObjCRuntime().GetClass(Builder, E->getClassReceiver()); - else - Base = EmitScalarExpr(E->getBase()); - return LValue::MakePropertyRef(E, Base); -} - LValue CodeGenFunction::EmitStmtExprLValue(const StmtExpr *E) { // Can only get l-value for message expression returning aggregate type RValue RV = EmitAnyExprToTemp(E); |