From e68b9842d2d6adc2c72c81c845a2c68e58d9d3a4 Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 4 Dec 2010 03:11:00 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120887 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 3b1a82e67f..c98ee17842 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/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); -- cgit v1.2.3