Add a destination type argument to EmitConstantExpr. This will be used for when the destination has a reference type. (No functionality change yet)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68593 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 508d7ce..2c1ab1f 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -693,7 +693,7 @@
}
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();