[PATCH] Microsoft C++ Record Layout
whunt at google.com
Wed Jul 10 16:35:13 PDT 2013
Here's an update that contains everything associated with C++ record layout and a pile of test cases for validation. A few things to note:
* It's still in two files and doesn't use CRTP. The net overlap between the current record builder and this one is 7 member variables, 1 typedef and 10 functions with the same names but different functionality. The closest functionality is laying out fields (non-bit-fields) but it rounds in a slightly different place and is only a few lines of code. Basically although in spirit the ms and non-ms builders achieve similar goals, they do so in completely different ways. I would use an analogy of implementing a dictionary using a B-tree or a red-black tree. They may both implement a dictionary using a tree but don't actually have much of any share-able code.
* Currently, there exists classes for which CGRecordLayoutBuilder can't handle and will trip an assert. Such classes exist in the currently checked in code:http://llvm.org/bugs/show_bug.cgi?id=16459
but this patch causes some in the existing ms_class_layout lit test and at least one other. I'll need to fix CGRecordLayoutBuilder and will likely have questions. This issue should be addressed before the patch lands, hopefully before I leave for a conference/paternity leave late next week...
* I have not yet ripped out the current references to IsMsStruct but will do so as soon as I get CGRecordLayoutBuilder patched in such a way I can run check-clang successfully. I don't see any difficulty there.
Hi rnk, rsmith,
CHANGE SINCE LAST DIFF
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 135264 bytes
Desc: not available
More information about the cfe-commits