From 38d068e8f13a119b89a3b8b0f79f35cab1ffd09a Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Wed, 20 May 2009 01:24:22 +0000 Subject: 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 --- lib/CodeGen/CGExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExpr.cpp') 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()); -- cgit v1.2.3