From 80f97ab08fe679307edcc31f3d7ceb6f0d951a5b Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Wed, 8 Apr 2009 04:48:15 +0000 Subject: Add a destination type argument to EmitConstantExpr. This will be used for when the destination has a reference type. (No functionality change yet) llvm-svn: 68593 --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 508d7ce2b6f3..2c1ab1f8b59b 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(); -- cgit v1.2.3