Unbreak self-host.
llvm-svn: 104390
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index 4a7e6ec..3bf2f8a 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -573,10 +573,14 @@
llvm::Value *Null = llvm::Constant::getNullValue(CGF.ConvertType(T));
CGF.EmitStoreThroughLValue(RValue::get(Null), LV, T);
} else {
+ // Otherwise, just memset the whole thing to zero. This is legal
+ // because in LLVM, all default initializers are guaranteed to have a
+ // bit pattern of all zeros.
+ // FIXME: That isn't true for member pointers!
// There's a potential optimization opportunity in combining
// memsets; that would be easy for arrays, but relatively
// difficult for structures with the current code.
- CGF.EmitNullInitialization(LV.getAddress(), T);
+ CGF.EmitMemSetToZero(LV.getAddress(), T);
}
}