summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 508d7ce2b6f..2c1ab1f8b59 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -693,7 +693,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) {
}
Init = llvm::Constant::getNullValue(InitTy);
} else {
- Init = EmitConstantExpr(D->getInit());
+ Init = EmitConstantExpr(D->getInit(), D->getType());
if (!Init) {
ErrorUnsupported(D, "static initializer");
QualType T = D->getInit()->getType();
OpenPOWER on IntegriCloud