[cfe-dev] how to mapping from struct index to name
daniel at zuster.org
Tue Apr 27 08:04:13 PDT 2010
Ah, this explains later message.
Why do you want to do this? Are you prepared to handle bit-fields?
On Mon, Apr 26, 2010 at 11:04 AM, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote:
> How can I find out the mapping between structure element names and index
> in getelementptr?
> If I have the following program:
> struct Foo
> int i;
> float j;
> Foo foo;
> void main()
> foo.j = 1.0f
> I get an instruction containing getelementptr (%Foo* @foo, i32 0, i32 1)
> Member i is at index 0 and member j is at index 1.
> This is what I want to find out.
> Perhaps it can be done using debug info?
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev