From b0d0ea042116c1f451d3db8ceff9f1dd92bc36d2 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 2 Aug 2009 21:18:22 +0000 Subject: use CodeGenModule::EmitNullConstant in a couple of places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77915 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index ec9a97aabd..c37fbe2efc 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -810,6 +810,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { // exists. A use may still exists, however, so we still may need // to do a RAUW. assert(!ASTTy->isIncompleteType() && "Unexpected incomplete type"); + Init = EmitNullConstant(D->getType()); Init = llvm::Constant::getNullValue(getTypes().ConvertTypeForMem(ASTTy)); } else { Init = EmitConstantExpr(D->getInit(), D->getType()); -- cgit v1.2.3-18-g5258