[PATCH] Complete Rewrite of CGRecordLayoutBuilder
whunt at google.com
Tue Feb 18 16:48:43 PST 2014
whunt added you to the CC list for the revision "Complete Rewrite of CGRecordLayoutBuilder".
Hi rnk, rjmccall, majnemer,
This patch completely replaces CGRecordLayoutBuilder. CGRecordLayoutBuilder was aging, complex, multi-pass, shows signs of existing before ASTRecordLayoutBuilder and was getting hackier as support for MS layout, including vbase placement, vtordisps, ms-bitfields and a variety of other features. By reimplementing it, a significant code reduction was achieved and a significant amount of duplication of functionality between CGRecordLayoutBuilder and ASTRecordLayoutBuilder was removed.
The architecture of the new system is described in the comments. For the most part, the new system simply takes all of the fields and bases from an ASTRecordLayout, sorts them, inserts padding and dumps a record. Bitfields, unions and primary virtual bases make this process a bit more complicated.
I'm sorry the diff is hard to read due to the way diff works when replacing almost the entire contents of a file.
I had to update a few lit tests due to the fact that the new system compute more accurate llvm types than CGRecordLayoutBuilder. I'll comment on each change individually.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 79863 bytes
Desc: not available
More information about the cfe-commits