forked from OSchip/llvm-project
We don't generate null initializer expressions anymore, and
we don't need to. llvm-svn: 139769
This commit is contained in:
parent
888bea0b95
commit
8f8f8d67ea
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue