diff options
author | John McCall <rjmccall@apple.com> | 2010-08-22 21:01:12 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-22 21:01:12 +0000 |
commit | 614dbdcd55c757048f2529cce13bdb3db1411dae (patch) | |
tree | 002f31fb40834333ddcb36c382a8629d7eb4bdbb /clang/lib/CodeGen/CGExprCXX.cpp | |
parent | 0b84914da069ac4637e234eeddd256716af03228 (diff) | |
download | bcm5719-llvm-614dbdcd55c757048f2529cce13bdb3db1411dae.tar.gz bcm5719-llvm-614dbdcd55c757048f2529cce13bdb3db1411dae.zip |
Go back to asking CodeGenTypes whether a type is zero-initializable.
Make CGT defer to the ABI on all member pointer types.
This requires giving CGT a handle to the ABI.
It's way easier to make that work if we avoid lazily creating the ABI.
Make it so.
llvm-svn: 111786
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index e8bc9b4f9aa..feaf4676360 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -547,8 +547,7 @@ static void EmitNewInitializer(CodeGenFunction &CGF, const CXXNewExpr *E, if (!E->hasInitializer() || Ctor->getParent()->isEmpty()) return; - if (!CGF.CGM.getCXXABI().RequiresNonZeroInitializer( - E->getAllocatedType())) { + if (CGF.CGM.getTypes().isZeroInitializable(E->getAllocatedType())) { // Optimization: since zero initialization will just set the memory // to all zeroes, generate a single memset to do it in one shot. EmitZeroMemSet(CGF, E->getAllocatedType(), NewPtr, |