summaryrefslogtreecommitdiffstats
path: root/clang/test/Layout/ms-x86-alias-avoidance-padding.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix the layout of bitfields in ms_struct unions: theirJohn McCall2015-08-191-24/+0
| | | | | | | | | | | | | | | 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
* __declspec is not a core Clang language extension. Instead, require ↵Aaron Ballman2015-05-261-2/+2
| | | | | | | -fms-extensions or -fborland to enable the language extension. Note: __declspec is also temporarily enabled when compiling for a CUDA target because there are implementation details relying on __declspec(property) support currently. When those details change, __declspec should be disabled for CUDA targets. llvm-svn: 238238
* [MS-ABI] Fixed alias-avoidance padding in the presence of vtordispsWarren Hunt2014-04-111-0/+31
| | | | | | | If a vtordisp exists between two bases, then there is no need for additional alias avoidance padding. Test case included. llvm-svn: 206087
* [MS-ABI] Fix to vbptr injection site calculation.Warren Hunt2014-04-101-108/+108
| | | | | | | | The vbptr is injected after the last non-virtual base lexographically rather than the last non-virtual base in layout order. Test case included. Also, some line ending fixes. llvm-svn: 206000
* [MS-ABI] Update to alias-avoidance paddingWarren Hunt2014-04-091-0/+260
| | | | | | | | | | This patch changes how we determine if padding is needed between two bases in msvc compatibility mode. Test cases included. In addition, a very minor change to the printing of structures to ease lit testing. llvm-svn: 205933
* Render anonymous entities as '(anonymous <thing>)' (and lambdas as '(lambda ↵David Blaikie2014-04-021-4/+4
| | | | | | | | | | | | at ... )') For namespaces, this is consistent with mangling and GCC's debug info behavior. For structs, GCC uses <anonymous struct> but we prefer consistency between all anonymous entities but don't want to confuse them with template arguments, etc, so we'll just go with parens in all cases. llvm-svn: 205398
* MS ABI: Fix some layout testsDavid Majnemer2014-02-031-14/+14
| | | | | | | | | | | | Some lines intended to be used for testing x86_64 ABI compatibility were not firing because lines were annotated with the wrong FileCheck prefix: X64 vs x64 N.B. Changes beyond just changing x64 to X64 were made, presumably because other parts of the layout engine have changed. I've verified the changes to make sure that MSVC creates a compatible layout. llvm-svn: 200670
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-141-2/+2
| | | | | | | | | | | | | | | 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] Leading VFPtrs don't suppress the leading zero sized flagWarren Hunt2014-01-131-0/+44
| | | | | | | | | | The MS-ABI tracks a bit that asserts that the first sub-object is zero sized. This bit is used to add padding between objects if there's the potential for zero sized objects to alias. The bit is still true even if the zero sized base is lead by a VFPtr. This patch makes clang mimic that behavior. llvm-svn: 199132
* [ms-abi] Adjusting Rules for Padding Between BasesWarren Hunt2014-01-101-7/+69
| | | | | | | | | | | The presence of a VBPtr suppresses the presence of zero sized sub-objects in the non-virtual portion of the object in the context of determining if two base objects need alias-avoidance padding placed between them. Test cases included. llvm-svn: 198975
* [ms-abi] Refactor Microsoft Record LayoutWarren Hunt2014-01-091-70/+94
| | | | | | | | | This patch refactors microsoft record layout to be more "natural". The most dominant change is that vbptrs and vfptrs are injected after the fact. This simplifies the implementation and the math for the offest for the first base/field after the vbptr. llvm-svn: 198818
* [ms-abi] 64-bit fixes for r196549Warren Hunt2013-12-101-3/+3
| | | | | | | | In order to address latent bugs that were easier to expose in 64-bit mode, we move the application of __declspec(align) to before the layout of vbases rather than after. llvm-svn: 196861
* [MS-ABI] Fix alias-avoidance padding between basesWarren Hunt2013-12-061-0/+178
Adds padding between bases or virtual bases in an attempt to avoid aliasing of zero-sized sub-objects. The approach used by the ABI adds two more bits of state. Detailed comments are in the code. Test cases included. Differential Revision: http://llvm-reviews.chandlerc.com/D2258 llvm-svn: 196602
OpenPOWER on IntegriCloud