search for: mergestruct

Displaying 1 result from an estimated 1 matches for "mergestruct".

2012 Oct 13
1
[LLVMdev] Accessing merged globals through PointerType
...alMerge_8cpp_source.html I am concerned with lines 149-163 of the above file. From the documentation at the top of the file, it will convert this: static int foo[N], bar[N], baz[N]; for (i = 0; i < N; ++i) { foo[i] = bar[i] * baz[i]; } Into something like this (slightly modified): struct mergestruct { int foo[N]; int bar[N]; int baz[N]; }; static struct mergestruct merged; for (i = 0; i < N; ++i) { merged.foo[i] = merged.bar[i] * merged.baz[i]; } Great, now in addition I want to use an extra pointer to access the elements, like this: struct mergestruct *merged_ptr = &merged;...