summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-02 21:18:22 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-02 21:18:22 +0000
commitf18318cf4e123b51bc3532296f37c5247d322434 (patch)
tree820d5fb9094e2f9f4cc39f1be1a1b73b1db10ab8 /clang/lib/CodeGen/CodeGenModule.cpp
parent133d9105d3da9ab4d9a1822019d5cf017a9778a6 (diff)
downloadbcm5719-llvm-f18318cf4e123b51bc3532296f37c5247d322434.tar.gz
bcm5719-llvm-f18318cf4e123b51bc3532296f37c5247d322434.zip
use CodeGenModule::EmitNullConstant in a couple of places.
llvm-svn: 77915
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index ec9a97aabd6..c37fbe2efcd 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud