On Aug 21, 2013, at 2:31 AM, Karthik Bhat <[email protected]> wrote:
> Thanks for the reply. Please correct me if i'm wrong but shouldn't this be 
> general for all unions and not just transparent unions? 
> Shouldn't we be handling union in similar way we are handling structures in 
> this function except that the size of union will be calculated differently?

The method you’re modifying is part of a best-effort attempt to try to pass 
aggregates as individual scalar values in order to generate prettier IR and 
enable better optimization.  By design, it should not return “true” in any case 
where doing so would affect the ABI.

The correct behavior for transparent unions is to look through the transparent 
union (to its first member, not its largest) when deciding how to pass the 
object.

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to