Abstract more member-pointerness out.

llvm-svn: 111771
This commit is contained in:
John McCall
2010-08-22 04:16:24 +00:00
parent a8bbb82c55
commit 84fa510aa9
7 changed files with 173 additions and 70 deletions

View File

@@ -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 =