summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commitad007d44b6d79502b689e0e98be896cbfa4731d1 (patch)
treeecd3882e255eb12abbf64f13aa1b3349e4afa515 /clang/lib/CodeGen
parent61da18645b03bb1d61db0a7f6a3f18a16496134e (diff)
downloadbcm5719-llvm-ad007d44b6d79502b689e0e98be896cbfa4731d1.tar.gz
bcm5719-llvm-ad007d44b6d79502b689e0e98be896cbfa4731d1.zip
Create a temporary if the lvalue is a bitfield. Reported by Eli.
llvm-svn: 72155
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 299bb6b4a4a..eaf0873610d 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud