aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-30 17:58:55 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-30 17:58:55 +0000
commit20fbe7c4772d537c1f779b1ff89cbb57d1d9afff (patch)
tree3397a078405505083393d33587047acb8ed3f0ac /lib/CodeGen/CGExpr.cpp
parent67aba816901503d9cf7ba699525fa62cc7f8e5e4 (diff)
L-value to r-value conversion is not ready for prime-time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index c28e405797..ce25b7ff25 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -1789,7 +1789,8 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) {
llvm_unreachable("dependent cast kind in IR gen!");
case CK_NoOp:
- if (!E->getSubExpr()->isRValue()) {
+ if (E->getSubExpr()->Classify(getContext()).getKind()
+ != Expr::Classification::CL_PRValue) {
LValue LV = EmitLValue(E->getSubExpr());
if (LV.isPropertyRef() || LV.isKVCRef()) {
QualType QT = E->getSubExpr()->getType();
@@ -1804,7 +1805,6 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) {
}
// Fall through to synthesize a temporary.
- case CK_LValueToRValue:
case CK_BitCast:
case CK_ArrayToPointerDecay:
case CK_FunctionToPointerDecay: