Send code generation for xvalues down the same path as lvalues

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124023 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index bdc4ef7..8e5ee75 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -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())
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index a648b9c..7457579 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -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();