summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-22 02:44:21 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-22 02:44:21 +0000
commit9c399a29fd5b57c7a200d1fd014f39684c78a0e1 (patch)
tree7258302c675fe6a747a10a777e785e59a1b8b4ee
parentb8c7fe9dc94f7c676601aaf3c6ab994259ac3e30 (diff)
downloadbcm5719-llvm-9c399a29fd5b57c7a200d1fd014f39684c78a0e1.tar.gz
bcm5719-llvm-9c399a29fd5b57c7a200d1fd014f39684c78a0e1.zip
Send code generation for xvalues down the same path as lvalues
llvm-svn: 124023
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp2
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index bdc4ef723ab..8e5ee759722 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -202,7 +202,7 @@ EmitExprForReferenceBinding(CodeGenFunction &CGF, const Expr *E,
}
RValue RV;
- if (E->isLValue()) {
+ if (E->isGLValue()) {
// Emit the expression as an lvalue.
LValue LV = CGF.EmitLValue(E);
if (LV.isSimple())
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index a648b9c6b3b..745757977a0 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -1110,7 +1110,7 @@ Value *ScalarExprEmitter::EmitCastExpr(CastExpr *CE) {
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();
OpenPOWER on IntegriCloud