aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-11-07 03:59:57 +0000
committerJohn McCall <rjmccall@apple.com>2011-11-07 03:59:57 +0000
commitdb45806b991013280a03057025c9538de64d5dfb (patch)
treef901482e8ab94f363790ebeee7b07b69bf24508f /lib/CodeGen/CGExprScalar.cpp
parent6796fc1adcaf57c38d072a238b016b2834afbe0d (diff)
Rip the ObjCPropertyRef l-value kind out of IR-generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--lib/CodeGen/CGExprScalar.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 83ca159aa5..b888138dda 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -244,11 +244,6 @@ public:
Value *VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) {
return EmitLoadOfLValue(E);
}
- Value *VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
- assert(E->getObjectKind() == OK_Ordinary &&
- "reached property reference without lvalue-to-rvalue");
- return EmitLoadOfLValue(E);
- }
Value *VisitObjCMessageExpr(ObjCMessageExpr *E) {
if (E->getMethodDecl() &&
E->getMethodDecl()->getResultType()->isReferenceType())
@@ -1051,6 +1046,7 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
// are in the same order as in the CastKind enum.
switch (Kind) {
case CK_Dependent: llvm_unreachable("dependent cast kind in IR gen!");
+ case CK_GetObjCProperty: llvm_unreachable("GetObjCProperty!");
case CK_LValueBitCast:
case CK_ObjCObjectLValueCast: {
@@ -1170,14 +1166,6 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
llvm_unreachable("scalar cast to non-scalar value");
break;
- case CK_GetObjCProperty: {
- assert(E->isGLValue() && E->getObjectKind() == OK_ObjCProperty &&
- "CK_GetObjCProperty for non-lvalue or non-ObjCProperty");
- LValue LV = CGF.EmitObjCPropertyRefLValue(E->getObjCProperty());
- RValue RV = CGF.EmitLoadOfPropertyRefLValue(LV);
- return RV.getScalarVal();
- }
-
case CK_LValueToRValue:
assert(CGF.getContext().hasSameUnqualifiedType(E->getType(), DestTy));
assert(E->isGLValue() && "lvalue-to-rvalue applied to r-value!");
@@ -1716,10 +1704,6 @@ Value *ScalarExprEmitter::EmitCompoundAssign(const CompoundAssignOperator *E,
if (!CGF.getContext().getLangOptions().CPlusPlus)
return RHS;
- // Objective-C property assignment never reloads the value following a store.
- if (LHS.isPropertyRef())
- return RHS;
-
// If the lvalue is non-volatile, return the computed value of the assignment.
if (!LHS.isVolatileQualified())
return RHS;
@@ -2342,10 +2326,6 @@ Value *ScalarExprEmitter::VisitBinAssign(const BinaryOperator *E) {
if (!CGF.getContext().getLangOptions().CPlusPlus)
return RHS;
- // Objective-C property assignment never reloads the value following a store.
- if (LHS.isPropertyRef())
- return RHS;
-
// If the lvalue is non-volatile, return the computed value of the assignment.
if (!LHS.isVolatileQualified())
return RHS;