We don't generate null initializer expressions anymore, and

we don't need to.

llvm-svn: 139769
This commit is contained in:
John McCall 2011-09-15 01:54:21 +00:00
parent 888bea0b95
commit 8f8f8d67ea
1 changed files with 3 additions and 5 deletions

View File

@ -559,11 +559,9 @@ static void EmitMemberInitializer(CodeGenFunction &CGF,
LHS = CGF.EmitLValueForFieldInitialization(ThisPtr, Field, 0);
}
// FIXME: If there's no initializer and the CXXCtorInitializer
// was implicitly generated, we shouldn't be zeroing memory.
if (FieldType->isArrayType() && !MemberInit->getInit()) {
CGF.EmitNullInitialization(LHS.getAddress(), Field->getType());
} else if (!CGF.hasAggregateLLVMType(Field->getType())) {
assert(MemberInit->getInit());
if (!CGF.hasAggregateLLVMType(Field->getType())) {
if (LHS.isSimple()) {
CGF.EmitExprAsInit(MemberInit->getInit(), Field, LHS, false);
} else {