diff options
author | John McCall <rjmccall@apple.com> | 2010-11-30 10:13:06 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-11-30 10:13:06 +0000 |
commit | 7e4857931bfe27bb355275bc7ec1eaa44612dfff (patch) | |
tree | 6123b51c2efa712f7457976d989740be903a254a /lib/CodeGen/CGExprScalar.cpp | |
parent | 6710cf1d5f3ab31524af6d72278ec5952f75b3c4 (diff) |
Introduce an r-value to l-value cast kind. I'm not promising anything
about the reliability of this yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index e5ea26c24b..a46afe6f65 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1101,6 +1101,10 @@ Value *ScalarExprEmitter::EmitCastExpr(CastExpr *CE) { case CK_ToUnion: llvm_unreachable("scalar cast to non-scalar value"); break; + + case CK_LValueToRValue: + assert(CGF.getContext().hasSameUnqualifiedType(E->getType(), DestTy)); + return Visit(const_cast<Expr*>(E)); case CK_IntegralToPointer: { Value *Src = Visit(const_cast<Expr*>(E)); |