summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/ms_class_layout.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix the layout of bitfields in ms_struct unions: theirJohn McCall2015-08-191-9/+2
| | | | | | | | | | | | | | | alignment is ignored, and they always allocate a complete storage unit. Also, change the dumping of AST record layouts: use the more readable C++-style dumping even in C, include bitfield offset information in the dump, and don't print sizeof/alignof information for fields of record type, since we don't do so for bases or other kinds of field. rdar://22275433 llvm-svn: 245514
* -fdump-record-layouts: Sort nvbases by offset before printing themReid Kleckner2014-02-281-2/+2
| | | | | | It makes our -fdump-record-layouts a little more sane. llvm-svn: 202457
* Complete Rewrite of CGRecordLayoutBuilderWarren Hunt2014-02-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CGRecordLayoutBuilder was aging, complex, multi-pass, and shows signs of existing before ASTRecordLayoutBuilder. It redundantly performed many layout operations that are now performed by ASTRecordLayoutBuilder and asserted that the results were the same. With the addition of support for the MS-ABI, such as placement of vbptrs, vtordisps, different bitfield layout and a variety of other features, CGRecordLayoutBuilder was growing unwieldy in its redundancy. This patch re-architects CGRecordLayoutBuilder to not perform any redundant layout but rather, as directly as possible, lower an ASTRecordLayout to an llvm::type. The new architecture is significantly smaller and simpler than the CGRecordLayoutBuilder and contains fewer ABI-specific code paths. It's also one pass. 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. See the inline comments. In addition, this patch updates a few lit tests due to the fact that the new system computes more accurate llvm types than CGRecordLayoutBuilder. Each change is commented individually in the review. Differential Revision: http://llvm-reviews.chandlerc.com/D2795 llvm-svn: 201907
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-141-1/+1
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 llvm-svn: 199250
* [ms-abi] Fixed failing lit test.Warren Hunt2014-01-091-1/+1
| | | | | | This test adjustment was missing from the previous patch. llvm-svn: 198822
* Adds Microsoft compatiable C++ record layout code to clang.Warren Hunt2013-10-111-44/+44
| | | | llvm-svn: 192494
* Test verified.John McCall2012-05-011-1/+0
| | | | llvm-svn: 155932
* Add a disclaimer to the new test, plus a user-declared ctorJohn McCall2012-05-011-1/+2
| | | | | | to force the emission of vtordisps. llvm-svn: 155906
* Add support for laying out vtordisps according to our currentJohn McCall2012-05-011-0/+173
| | | | | | | working knowledge of the Microsoft ABI. Based on a patch by Dmitry Sokolov. llvm-svn: 155905
* Fix MSVC class layout for empty classes. Patch by Dmitry Sokolov.Eli Friedman2011-12-011-0/+8
| | | | llvm-svn: 145544
* Fix the layout of vb-tables and vf-tables in the MS C++ ABI.John McCall2011-11-081-7/+105
| | | | | | Based on work by Dmitry Sokolov! llvm-svn: 144072
* Add tests for CodeGen types in MS ABI. Based on patch by r4start.Eli Friedman2011-10-211-1/+19
| | | | llvm-svn: 142697
* More ASTRecordLayout changes for MS ABI; based on patch by r4start.Eli Friedman2011-10-211-19/+34
| | | | llvm-svn: 142694
* Rewrite parts of MS ABI C++ layout. Based on work by r4start; I ended up ↵Eli Friedman2011-10-181-4/+24
| | | | | | doing this while I was trying to review his patch. llvm-svn: 142325
* Some changes to improve compatibility for MSVC-style C++ struct layout. ↵Eli Friedman2011-09-271-0/+176
Patch from r4start at gmail.com (with some minor modifications by me). llvm-svn: 140623
OpenPOWER on IntegriCloud