On 09/01/2011 11:10 AM, Aldy Hernandez wrote:
Basically you can only touch the size of the CLASSTYPE_AS_BASE variant.
For many classes this will be the same as the size of the class itself.

All this code is in the middle end, so we're language agnostic.

What do we need here, a hook to query the front-end, or is it too late?
Or will we have to play it conservative and never touch the padding
(regardless of language)?

I think it would make sense to expose this information to the back end somehow. A hook would do the trick: call it type_data_size or type_min_size or some such, which in the C++ front end would return TYPE_SIZE (CLASSTYPE_AS_BASE (t)) for classes or just TYPE_SIZE for other types.

Jason

Reply via email to