[LLVMdev] Problem with missing support for non-zero contant initializers.

Chris Lattner sabre at nondot.org
Mon Aug 20 12:25:08 PDT 2007


In that case, Ada should just use UndefValue, which should work  
today.  :)

-Chris

http://nondot.org/sabre
http://llvm.org

On Aug 20, 2007, at 12:03 PM, Duncan Sands <baldrick at free.fr> wrote:

>>> D allows static arrays up to 16MB in size. I'm initializing global
>>> static arrays with a constant initializer. But D requires that (per
>>> default) static arrays are initialized with the default initializer
>>> for the element type. For float this happens to be NaN, so I cannot
>>> use a 'zeroinitializer'.
>>
>> Wow, this *is* bad.  I think the solution to this is to add a new
>> ConstantFillArray node.  It would always have array type, would  
>> take a
>> single Constant* value, and would give you the filled array with that
>> constant.  Please file a bug if you're interested.
>
> In Ada, global variables should in general be default initialized to  
> undef
> (not zero) so this could also be useful for Ada.
>
> Ciao,
>
> Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list