aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-22 21:01:12 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-22 21:01:12 +0000
commit614dbdcd55c757048f2529cce13bdb3db1411dae (patch)
tree002f31fb40834333ddcb36c382a8629d7eb4bdbb /clang/lib/CodeGen/CodeGenFunction.cpp
parent0b84914da069ac4637e234eeddd256716af03228 (diff)
downloadllvm-614dbdcd55c757048f2529cce13bdb3db1411dae.zip
llvm-614dbdcd55c757048f2529cce13bdb3db1411dae.tar.gz
llvm-614dbdcd55c757048f2529cce13bdb3db1411dae.tar.bz2
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/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 91442fa..2b20dd9 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -579,8 +579,7 @@ 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.getLangOptions().CPlusPlus &&
- CGM.getCXXABI().RequiresNonZeroInitializer(Ty)) {
+ if (!CGM.getTypes().isZeroInitializable(Ty)) {
llvm::Constant *NullConstant = CGM.EmitNullConstant(Ty);
llvm::GlobalVariable *NullVariable =