search for: a_union

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

Did you mean: t_union
2003 Dec 19
2
[LLVMdev] Union Type
...er type as the basis for the array .. but then, it wouldn't work reliably on an 8086 with segmented memory model :) While various tests for word sizes and alignment rules could be used, this problem is _gracefully_ handled by unions. To rewrite the example above we would use something like: %a_union = union { int, char* }; %foo = global [ 10 x %a_union ]; void %func() { %int_ptr = getelementptr [10 x %a_union]* %foo, long 0, long 0, ubyte 0; %int_val = load int* %int_ptr; %char_ptr = getelementptr [10 x %a_union]* %foo, long 0, long 0, ubyte 1; %good = load c...