On Jul 16, 2012, at 3:43 AM, Jonathan Sauer <[email protected]> wrote:
> Hello, > > attached is a patch (without tests) to fix > <http://llvm.org/bugs/show_bug.cgi?id=13329>. > With this patch, the llvm.memcpy instruction generated by clang only copy the > whole struct > if it is a POD. Otherwise they do no longer copy the tail padding as well, as > it can and > will be reused for the fields of derived classes. > > If the general approach to fixing this bug is ok I will add the necessary > tests. As noted in the PR: This is definitely the right approach. A few specific comments: - This change should affect the the EmitGCMemmoveCollectable call as well, since the same bug exists there for Objective-C++ GC - There are other CreateMemCpy calls in IR generation that likely need this same computation. Please factor this computation into a separate routine and update those callers - Please include a test case that generates IR and checks that it does the right thing Thanks for working on this! - Doug
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
