[cfe-dev] accessibility of codegen headers

Jochen Wilhelmy j.wilhelmy at arcor.de
Thu Jun 17 01:22:38 PDT 2010


> What are you using these for?  They should be private implementation details of the IR generation module.  The layout information for structs is known in the AST level.
>    

In the AST level there is no information about the alignment, e.g.
struct {char a; double b}; may result in a being at index 0 and
b being at index 2 because some alignment padding is between a and b.

I need the index of a and b as they appear in the resulting IR because 
(in my
custom application) I need to know if a getelementptr accesses a or b.
Currently the only way for me to find this out is using CGRecordLayout.

-Jochen




More information about the cfe-dev mailing list