summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 7028e744919..9fd571b8164 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -105,9 +105,8 @@ CodeGenFunction::CreateStaticBlockVarDecl(const VarDecl &D,
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) {
OpenPOWER on IntegriCloud