use CodeGenModule::EmitNullConstant in a couple of places.
llvm-svn: 77915
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 7028e74..9fd571b 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -105,9 +105,8 @@
const llvm::Type *LTy = CGM.getTypes().ConvertTypeForMem(Ty);
return new llvm::GlobalVariable(CGM.getModule(), LTy,
Ty.isConstant(getContext()), Linkage,
- llvm::Constant::getNullValue(LTy), Name,
- 0, D.isThreadSpecified(),
- Ty.getAddressSpace());
+ CGM.EmitNullConstant(D.getType()), Name, 0,
+ D.isThreadSpecified(), Ty.getAddressSpace());
}
void CodeGenFunction::EmitStaticBlockVarDecl(const VarDecl &D) {