aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-06-03 19:58:07 +0000
committerEli Friedman <eli.friedman@gmail.com>2010-06-03 19:58:07 +0000
commit0b29227012aacb1ae42277b0a63d28acb1b35270 (patch)
tree789fbec42d39497861e850e2fe6265d279e3eeba /lib/CodeGen/CGClass.cpp
parent5250f27420386452a21692a6292c99ee7febdac4 (diff)
Don't intentionally try to ignore the value of a scalar expression when we
actually care about it. Fixes PR7291. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index bebea549f9..348f85b32f 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -467,7 +467,7 @@ static void EmitMemberInitializer(CodeGenFunction &CGF,
} else if (FieldType->isArrayType() && !MemberInit->getInit()) {
CGF.EmitNullInitialization(LHS.getAddress(), Field->getType());
} else if (!CGF.hasAggregateLLVMType(Field->getType())) {
- RHS = RValue::get(CGF.EmitScalarExpr(MemberInit->getInit(), true));
+ RHS = RValue::get(CGF.EmitScalarExpr(MemberInit->getInit()));
CGF.EmitStoreThroughLValue(RHS, LHS, FieldType);
} else if (MemberInit->getInit()->getType()->isAnyComplexType()) {
CGF.EmitComplexExprIntoAddr(MemberInit->getInit(), LHS.getAddress(),