diff options
author | John McCall <rjmccall@apple.com> | 2010-08-22 04:16:24 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-22 04:16:24 +0000 |
commit | cf2c85e76fdafe7e634810a292321a6c8322483d (patch) | |
tree | a9a321fe0e905d44c0674b3069dece32b47f1ce9 /lib/CodeGen/CodeGenFunction.cpp | |
parent | 3023def6bea3af6dbb51eea51f8cb8ea892d26cf (diff) |
Abstract more member-pointerness out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 5bee016d7e..ca4e698229 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -579,7 +579,8 @@ CodeGenFunction::EmitNullInitialization(llvm::Value *DestPtr, QualType Ty) { // If the type contains a pointer to data member we can't memset it to zero. // Instead, create a null constant and copy it to the destination. - if (CGM.getTypes().ContainsPointerToDataMember(Ty)) { + if (CGM.getLangOptions().CPlusPlus && + CGM.getCXXABI().RequiresNonZeroInitializer(Ty)) { llvm::Constant *NullConstant = CGM.EmitNullConstant(Ty); llvm::GlobalVariable *NullVariable = |