aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-05-20 01:24:22 +0000
committerAnders Carlsson <andersca@mac.com>2009-05-20 01:24:22 +0000
commit38d068e8f13a119b89a3b8b0f79f35cab1ffd09a (patch)
treea2cbc5d81446fe5bbb28d0137f2fc8894388eece /lib/CodeGen/CGExpr.cpp
parente04d1c77ae15a6e973e2fac7723f6c364884f58d (diff)
Create a temporary if the lvalue is a bitfield. Reported by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 299bb6b4a4..eaf0873610 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -72,7 +72,7 @@ RValue CodeGenFunction::EmitAnyExprToTemp(const Expr *E, llvm::Value *AggLoc,
RValue CodeGenFunction::EmitReferenceBindingToExpr(const Expr* E,
QualType DestType) {
- if (E->isLvalue(getContext()) == Expr::LV_Valid) {
+ if (E->isLvalue(getContext()) == Expr::LV_Valid && !E->getBitField()) {
// Emit the expr as an lvalue.
LValue LV = EmitLValue(E);
return RValue::get(LV.getAddress());