diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-01-22 02:44:21 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-01-22 02:44:21 +0000 |
| commit | 9c399a29fd5b57c7a200d1fd014f39684c78a0e1 (patch) | |
| tree | 7258302c675fe6a747a10a777e785e59a1b8b4ee /clang/lib/CodeGen | |
| parent | b8c7fe9dc94f7c676601aaf3c6ab994259ac3e30 (diff) | |
| download | llvm-9c399a29fd5b57c7a200d1fd014f39684c78a0e1.zip llvm-9c399a29fd5b57c7a200d1fd014f39684c78a0e1.tar.gz llvm-9c399a29fd5b57c7a200d1fd014f39684c78a0e1.tar.bz2 | |
Send code generation for xvalues down the same path as lvalues
llvm-svn: 124023
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index bdc4ef7..8e5ee75 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 a648b9c..7457579 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(); |
