I think this patch is the wrong approach. Instead, EmitAggregateCopy should be modified so that it always copies structs using their data size if either the source or the destination might be a base-class subobject. There is no need to adjust the alignment.
We should conservatively assume that an object might be a base-class subobject if this is C++ and the class is not marked final. This is probably going to hurt the performance of generated code in some cases, and we should add a flag indicating that both objects are known to not be base-class subobjects. This flag should default to false. If you wouldn't mind writing up a new patch based on this approach, I'll save the code-style comments for that. John. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
