summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in comment.Nick Lewycky2011-03-221-1/+1
| | | | llvm-svn: 128088
* A much-delayed response to Ken Dyck's review: make this somewhat moreJohn McCall2011-02-261-10/+16
| | | | | | char-width agnostic. llvm-svn: 126542
* improve support for big endian targets, fixing PR8171, patchChris Lattner2011-02-171-2/+15
| | | | | | by Heikki Kultala! llvm-svn: 125784
* Refactor CGRecordLayoutBuilder to use CharUnits more consistently.John McCall2011-02-151-144/+162
| | | | llvm-svn: 125605
* Perform zero-initialization of virtual base classes when emitting John McCall2011-02-151-112/+100
| | | | | | | | | | | | a zero constant for a complete class. rdar://problem/8424975 To make this happen, track the field indexes for virtual bases in the complete object. I'm curious whether we might be better off making CGRecordLayoutBuilder *much* more reliant on ASTRecordLayout; we're currently duplicating an awful lot of the ABI layout logic. llvm-svn: 125555
* Convert RecordLayout::Alignment to CharUnits from bit units. No change inKen Dyck2011-02-151-3/+4
| | | | | | functionality intended. llvm-svn: 125549
* Add a helper function, ASTContext::toBits(), that converts sizes inKen Dyck2011-02-111-7/+4
| | | | | | | CharUnits to sizes in bits, and use it to tidy up the places where the conversion was done explicitly. llvm-svn: 125332
* Drop the 'InBits' part from the name of RecordSizeInBits as the value is inKen Dyck2011-02-101-5/+5
| | | | | | character units. llvm-svn: 125281
* Eliminate some signed-to-unsigned comparision warnings introduced inKen Dyck2011-02-101-2/+4
| | | | | | r125156. llvm-svn: 125280
* Convert RecordLayout::Size to CharUnits from bits. No changes toKen Dyck2011-02-091-6/+9
| | | | | | functionality intended. llvm-svn: 125156
* Convert RecordLayout::NonVirtualAlign to CharUnits. No change inKen Dyck2011-02-081-5/+10
| | | | | | functionality intended. llvm-svn: 125069
* Convert RecordLayout::NonVirtualSize from bit units to CharUnits.Ken Dyck2011-02-011-6/+7
| | | | llvm-svn: 124646
* Fix another obscure corner layout case.Argyrios Kyrtzidis2010-12-101-9/+13
| | | | llvm-svn: 121436
* Add a LayoutBase member function. No functionality change.Anders Carlsson2010-12-041-15/+22
| | | | llvm-svn: 120924
* Replace calls to AppendBytes with calls to AppendPadding when the bytes ↵Anders Carlsson2010-12-041-11/+6
| | | | | | appended are padding. llvm-svn: 120922
* CGRecordLayoutBuilder does not need to be exported from this module.John McCall2010-11-301-3/+1
| | | | llvm-svn: 120489
* Don't store the maximum alignment, we can trivially compute it.Anders Carlsson2010-11-281-12/+21
| | | | llvm-svn: 120268
* More work on laying out virtual bases.Anders Carlsson2010-11-281-9/+46
| | | | llvm-svn: 120257
* Begin work on actually laying out virtual bases.Anders Carlsson2010-11-251-1/+32
| | | | llvm-svn: 120140
* Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.Anders Carlsson2010-11-241-2/+2
| | | | llvm-svn: 120133
* Add CXXRecordDecl::getIndirectPrimaryBases.Anders Carlsson2010-11-241-1/+6
| | | | llvm-svn: 120129
* Simplify code.Anders Carlsson2010-11-241-13/+1
| | | | llvm-svn: 120109
* CGRecordLayout types are always struct types.Anders Carlsson2010-11-241-4/+4
| | | | llvm-svn: 120106
* Remove FIXME; we don't ever want to lay out empty bases.Anders Carlsson2010-11-221-7/+6
| | | | llvm-svn: 119957
* Rename BaseLLVMType to NonVirtualBaseLLVMType.Anders Carlsson2010-11-211-2/+2
| | | | llvm-svn: 119956
* Add getCGRecordLayout helper function. No functionality change.Anders Carlsson2010-11-211-6/+13
| | | | llvm-svn: 119955
* Remove debugging printf.Nick Lewycky2010-11-091-3/+0
| | | | | | Fix linux build. llvm-svn: 118497
* Introduce the concept of a non-virtual base type to CGRecordLayoutBuilder as ↵Anders Carlsson2010-11-091-9/+109
| | | | | | a first step towards fixing PR6995. llvm-svn: 118491
* Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a ↵Anders Carlsson2010-10-311-1/+1
| | | | | | getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. llvm-svn: 117881
* IRgen: Move CGBitFieldInfo strategy computation helpers to static memberDaniel Dunbar2010-09-021-11/+23
| | | | | | functions. llvm-svn: 112913
* Go back to asking CodeGenTypes whether a type is zero-initializable.John McCall2010-08-221-26/+21
| | | | | | | | | Make CGT defer to the ABI on all member pointer types. This requires giving CGT a handle to the ABI. It's way easier to make that work if we avoid lazily creating the ABI. Make it so. llvm-svn: 111786
* AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.Daniel Dunbar2010-05-271-2/+3
| | | | llvm-svn: 104795
* Correctly initialize bases with member pointers. This should fix PR6441 but ↵Anders Carlsson2010-05-181-7/+19
| | | | | | that test case is a bit weird and I'd like to investigate further before closing that bug. llvm-svn: 104025
* Keep track of the LLVM field numbers for non-virtual bases.Anders Carlsson2010-05-181-4/+16
| | | | llvm-svn: 104013
* Start laying out bases as individual fields. We still use ugly i8 arrays but ↵Anders Carlsson2010-05-181-14/+61
| | | | | | this is a step in the right direction. llvm-svn: 104012
* Use a more appropriate LLVM type for the vtable pointer.Anders Carlsson2010-05-051-3/+5
| | | | llvm-svn: 103078
* IRgen: Fix another case where we generated an invalid access component when weDaniel Dunbar2010-04-221-13/+12
| | | | | | | immediately narrowed the access size. Fix this (and previous case) by just choosing a better access size up-front. llvm-svn: 102068
* IRgen: Fix case where we might generate an access component with width == 0, ifDaniel Dunbar2010-04-221-0/+10
| | | | | | | we have to narrow the access side immediately (can happen with packed, -fno-bitfield-type-align). llvm-svn: 102067
* IRgen: Set alignment correctly on bit-field accesses.Daniel Dunbar2010-04-221-4/+4
| | | | llvm-svn: 102046
* IRgen: Rewrite bit-field access policy to not access data beyond the bounds ↵Daniel Dunbar2010-04-221-39/+83
| | | | | | | | | | | | of the structure, which we also now verify as part of the post-layout consistency checks. - This fixes some pedantic bugs with packed structures, as well as major problems with -fno-bitfield-type-align. - Fixes PR5591, PR5567, and all known -fno-bitfield-type-align issues. - Review appreciated. llvm-svn: 102045
* IRgen: Fix CGRecordLayout::print to print the bit-field infos in a ↵Daniel Dunbar2010-04-221-1/+14
| | | | | | consistent order. llvm-svn: 102044
* IRgen: Add checking that the LLVM and AST record layout offsets agree (forDaniel Dunbar2010-04-211-1/+20
| | | | | | non-bit-fields). llvm-svn: 102014
* IRgen: Always use i8 arrays to access union bit-fields. This is ugly, butDaniel Dunbar2010-04-201-15/+6
| | | | | | | matches how we currently handle structs, and this correctly handles -fno-bitfield-type-align. llvm-svn: 101918
* AST: Dump ASTRecordLayout objects when they are created with ↵Daniel Dunbar2010-04-191-1/+1
| | | | | | -fdump-record-layouts. llvm-svn: 101815
* IRgen: Kill unused function and move the type match assert to after record ↵Daniel Dunbar2010-04-191-13/+8
| | | | | | dumping. llvm-svn: 101814
* Simplify wide bit-field layout in CGRecordLayoutBuilder, and also fix a bug ↵Anders Carlsson2010-04-171-15/+10
| | | | | | where assigning to a bit-field member would overwrite other parts of the struct. llvm-svn: 101681
* Unnamed bit-fields in a union should be laid out with a type that doesn't ↵Anders Carlsson2010-04-171-1/+17
| | | | | | affect alignment. llvm-svn: 101673
* Factor union field layout code out into a separate function. No ↵Anders Carlsson2010-04-171-18/+31
| | | | | | functionality change. llvm-svn: 101671
* Vtable -> VTable renames across the board.Anders Carlsson2010-04-171-1/+1
| | | | llvm-svn: 101666
* Make CGRecordLayoutBuilder deal with wide bit-fields. Will land tests ↵Anders Carlsson2010-04-161-1/+20
| | | | | | shortly (Daniel, please review). llvm-svn: 101472
OpenPOWER on IntegriCloud