[cfe-commits] r43383 - in /cfe/trunk: CodeGen/CodeGenModule.cpp test/CodeGen/globalinit.c
Chris Lattner
clattner at apple.com
Tue Oct 30 11:28:30 PDT 2007
On Oct 26, 2007, at 9:31 AM, Devang Patel wrote:
> Author: dpatel
> Date: Fri Oct 26 11:31:40 2007
> New Revision: 43383
>
> URL: http://llvm.org/viewvc/llvm-project?rev=43383&view=rev
> Log:
> Codegen global array initializers.
>
>
> ======================================================================
> ========
> --- cfe/trunk/CodeGen/CodeGenModule.cpp (original)
> +++ cfe/trunk/CodeGen/CodeGenModule.cpp Fri Oct 26 11:31:40 2007
> @@ -72,7 +72,41 @@
> if (D->getInit()->isIntegerConstantExpr(Value, Context))
> Init = llvm::ConstantInt::get(Value);
> }
> - assert(Init && "FIXME: Global variable initializers unimp!");
> +
> + if (!Init) {
> + if (const InitListExpr *ILE = dyn_cast<InitListExpr>(D->getInit
> ()))
Nice, please pull this out into a separate method though, maybe
CodegenGlobalInit or something?
-Chris
More information about the cfe-commits
mailing list