[LLVMdev] Question about documentation of BitCast CExps.

Chris Lattner clattner at apple.com
Sat Feb 28 10:34:39 PST 2009


On Feb 28, 2009, at 6:22 AM, Jesper Louis Andersen wrote:

> In the documentation at [http://llvm.org/docs/LangRef.html], we have
> the section [#aggregateconstants] telling us that the aggregate
> constants are:
>
>  * Structure constants
>  * Array constants
>  * Vector constants
>  * Zeroinitialization

This is very confusing, and I just changed it.  These aren't  
"aggregate" in the same sense that aggregate types are.  I changed  
them to "complex constants" to avoid confusion.

> However, in [#constantexprs] we have a bitcast(CST, TYPE) operator
> with the documentation (emphasis by me):

There was no specific reason to duplicate the constraints for bitcast,  
so I removed it and now point to the bitcast instruction documentation  
(#i_bitcast).

Bitcasting pointers to pointers is ok, integers/fp/vectors can all be  
converted among them selves. You cannot bitcast a struct or array.

-Chris




More information about the llvm-dev mailing list