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 | 84fa510aa9ee3ee97ded906fe4635c2952596fe9 (patch) | |
tree | 99fc717368577049fd788cb8060618198f79f9ab /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | a8bbb82c55a3c8885b5cf23dd84f80b2a08c069a (diff) | |
download | bcm5719-llvm-84fa510aa9ee3ee97ded906fe4635c2952596fe9.tar.gz bcm5719-llvm-84fa510aa9ee3ee97ded906fe4635c2952596fe9.zip |
Abstract more member-pointerness out.
llvm-svn: 111771
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 5bee016d7e5..ca4e6982293 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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 = |