aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-09-15 01:54:21 +0000
committerJohn McCall <rjmccall@apple.com>2011-09-15 01:54:21 +0000
commit082aadee6381ec5e99c19c1e4aef41dcc5c00d2b (patch)
treeb90627ec57ce7a21758b2d4f60ac879ad575f3b4 /lib/CodeGen/CGClass.cpp
parent220ac8c175cb1bf9b18d82eefe036995d7a2164d (diff)
We don't generate null initializer expressions anymore, and
we don't need to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 6e0e1d418f..87eabe9e6e 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -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 {