[cfe-commits] r124023 - in /cfe/trunk/lib/CodeGen: CGExpr.cpp CGExprScalar.cpp
Douglas Gregor
dgregor at apple.com
Fri Jan 21 18:44:21 PST 2011
Author: dgregor
Date: Fri Jan 21 20:44:21 2011
New Revision: 124023
URL: http://llvm.org/viewvc/llvm-project?rev=124023&view=rev
Log:
Send code generation for xvalues down the same path as lvalues
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=124023&r1=124022&r2=124023&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Fri Jan 21 20:44:21 2011
@@ -202,7 +202,7 @@
}
RValue RV;
- if (E->isLValue()) {
+ if (E->isGLValue()) {
// Emit the expression as an lvalue.
LValue LV = CGF.EmitLValue(E);
if (LV.isSimple())
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=124023&r1=124022&r2=124023&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Fri Jan 21 20:44:21 2011
@@ -1110,7 +1110,7 @@
case CK_GetObjCProperty: {
assert(CGF.getContext().hasSameUnqualifiedType(E->getType(), DestTy));
- assert(E->isLValue() && E->getObjectKind() == OK_ObjCProperty &&
+ assert(E->isGLValue() && E->getObjectKind() == OK_ObjCProperty &&
"CK_GetObjCProperty for non-lvalue or non-ObjCProperty");
RValue RV = CGF.EmitLoadOfLValue(CGF.EmitLValue(E), E->getType());
return RV.getScalarVal();
More information about the cfe-commits
mailing list