summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commit8f8f8d67ea1cfbdf853b41c29f37a8585d46d8fc (patch)
tree6fdfdfbdbdef921b7c10bc04eae81b2767324819 /clang/lib/CodeGen
parent888bea0b952007b0121552666dd2415e1f352bbe (diff)
downloadbcm5719-llvm-8f8f8d67ea1cfbdf853b41c29f37a8585d46d8fc.tar.gz
bcm5719-llvm-8f8f8d67ea1cfbdf853b41c29f37a8585d46d8fc.zip
We don't generate null initializer expressions anymore, and
we don't need to. llvm-svn: 139769
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index 6e0e1d418ff..87eabe9e6e4 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/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 {
OpenPOWER on IntegriCloud