forked from OSchip/llvm-project
Send code generation for xvalues down the same path as lvalues
llvm-svn: 124023
This commit is contained in:
parent
b8c7fe9dc9
commit
9c399a29fd
|
@ -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())
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue