[LLVMdev] How to force the creation of arrays with zeroes?

Duncan Sands baldrick at free.fr
Fri Jan 20 00:22:30 PST 2012


Hi Stepan,

> Hi all. How to force the creation of arrays with zeroes? Or this use-case is not provided?

you can't, you can only get a ConstantAggregateZero.  This is actually kind of
annoying, and means that places expecting a ConstantArray have to remember to
also check for ConstantAggregateZero.  Perhaps there's a good reason for the
current design, but if not it would be great to eliminate this wart.

Ciao, Duncan.




More information about the llvm-dev mailing list