From f16aa103d3afd42fbca2ab346f191bf745cec092 Mon Sep 17 00:00:00 2001 From: John McCall Date: Sun, 22 Aug 2010 21:01:12 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111786 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprCXX.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/CodeGen/CGExprCXX.cpp') diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index e8bc9b4f9a..feaf467636 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/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, -- cgit v1.2.3