summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/RecordLayoutBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Do the same short-circuit optimization when laying out bases.Anders Carlsson2010-06-131-7/+18
| | | | llvm-svn: 105920
* Implement part of the EmptySubobjectMap optimization described in PR6998. We ↵Anders Carlsson2010-06-131-1/+16
| | | | | | still need to do this for bases. llvm-svn: 105919
* Correctly handle fields with virtual bases containing empty subobjects.Anders Carlsson2010-06-081-1/+27
| | | | llvm-svn: 105628
* When checking whether we can place a base subobject at an offset, we don't ↵Anders Carlsson2010-06-081-1/+22
| | | | | | need to go past the highest offset that's known to contain an empty base subobject. llvm-svn: 105611
* Minor cleanups to the empty subobject map.Anders Carlsson2010-06-081-8/+23
| | | | llvm-svn: 105608
* And now for the best part: Removing the old code.Anders Carlsson2010-05-301-190/+0
| | | | llvm-svn: 105162
* Turn on the new empty base subobject tracking code. It's a bit faster than ↵Anders Carlsson2010-05-301-19/+5
| | | | | | the previous code. However, it still has quadratic performance, something which I intend to fix shortly in a subsequent patch. llvm-svn: 105161
* Cleanup.Anders Carlsson2010-05-291-13/+6
| | | | llvm-svn: 105114
* Make EmptySubobjectMap::CanPlaceBaseAtOffset take a BaseSubobjectInfo as well.Anders Carlsson2010-05-291-16/+4
| | | | llvm-svn: 105113
* Change RecordLayoutBuilder::LayoutBase to take a BaseSubobjectInfo. No ↵Anders Carlsson2010-05-291-14/+14
| | | | | | functionality change. llvm-svn: 105112
* Rework the way virtual primary bases are added when laying out classes. ↵Anders Carlsson2010-05-291-52/+35
| | | | | | Instead of doing it as a separate step, we now use the BaseSubobjectInfo and use it when laying out the bases. This fixes a bug where we would either not add a primary virtual base at all, or add it at the wrong offset. llvm-svn: 105110
* Change LayoutVirtualBase to also take a BaseSubobjectInfo.Anders Carlsson2010-05-291-13/+15
| | | | llvm-svn: 105104
* Change RecordLayoutBuilder::LayoutNonVirtualBase to take a ↵Anders Carlsson2010-05-291-10/+19
| | | | | | BaseSubobjectInfo. No functionality change. llvm-svn: 105103
* Move computing the base subobject info for a class into the ↵Anders Carlsson2010-05-291-94/+149
| | | | | | RecordLayoutBuilder because we're going to need it to be able to correctly add offsets for primary virtual bases. llvm-svn: 105102
* Rename BaseInfo to BaseSubobjectInfo.Anders Carlsson2010-05-281-25/+47
| | | | llvm-svn: 105007
* Move BaseInfo outside of the EmptySubobject class.Anders Carlsson2010-05-281-13/+13
| | | | llvm-svn: 105002
* More work on the empty subobject map. This code is not yet used.Anders Carlsson2010-05-271-7/+225
| | | | llvm-svn: 104861
* Sema: Add initial support for '#pragma options align=mac68k'.Daniel Dunbar2010-05-271-20/+32
| | | | | | | - Docs are fairly sketchy, if someone wants to pore through gcc to look for holes I'd appreciate any failing test cases! llvm-svn: 104809
* More work on the new empty subobject map.Anders Carlsson2010-05-271-7/+169
| | | | llvm-svn: 104808
* Strip trailing whitespace.Daniel Dunbar2010-05-271-82/+82
| | | | llvm-svn: 104801
* AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.Daniel Dunbar2010-05-271-6/+5
| | | | llvm-svn: 104795
* More work on the empty subobjects map.Anders Carlsson2010-05-271-28/+49
| | | | llvm-svn: 104787
* Move ComputeEmptySubobjectSizes to EmptySubobjectMap.Anders Carlsson2010-05-261-61/+65
| | | | llvm-svn: 104702
* Stub out the EmptySubobjectsMap class.Anders Carlsson2010-05-261-2/+23
| | | | llvm-svn: 104701
* Inline the RecordLayoutBuilder constructor.Anders Carlsson2010-05-261-9/+7
| | | | llvm-svn: 104700
* Add a Layout overload that takes a CXXRecordDecl.Anders Carlsson2010-05-261-38/+48
| | | | llvm-svn: 104695
* Move RecordLayoutBuilder into an anonymous namespace.Benjamin Kramer2010-05-261-0/+2
| | | | llvm-svn: 104693
* Rename ASTRecordLayoutBuilder to RecordLayoutBuilder.Anders Carlsson2010-05-261-34/+34
| | | | llvm-svn: 104688
* Move the ASTRecordLayoutBuilder class declaration into the .cpp file.Anders Carlsson2010-05-261-3/+155
| | | | llvm-svn: 104686
* Fix thinko and remove another unused function.Anders Carlsson2010-05-261-36/+1
| | | | llvm-svn: 104683
* Fix build.Anders Carlsson2010-05-261-2/+4
| | | | llvm-svn: 104682
* No need to use the PrimaryBaseInfo struct in the builder.Anders Carlsson2010-05-261-19/+22
| | | | llvm-svn: 104681
* Remove FIXME.Anders Carlsson2010-05-261-1/+0
| | | | llvm-svn: 104674
* Fold the other Layout overload into its sole call site.Anders Carlsson2010-05-261-2/+37
| | | | llvm-svn: 104673
* Fold the ASTRecordLayoutBuilder::ComputeLayout overload that takes an ↵Anders Carlsson2010-05-261-17/+9
| | | | | | ObjCInterfaceDecl pointer into its only callsite. llvm-svn: 104672
* Move the relevant ASTContext member functions that deal with ↵Anders Carlsson2010-05-261-0/+73
| | | | | | ASTRecordLayoutBuilder into RecordLayoutBuilder.cpp. This matches the way we interact with other builder classes (CGRecordLayoutBuilder, VTableBuilder and VTTBuilder) and it also allows for making ASTRecordLayoutBuilder a private class without a header file. llvm-svn: 104671
* When recording empty subobjects we should always look at the primary virtual ↵Anders Carlsson2010-05-231-0/+7
| | | | | | base. llvm-svn: 104464
* Add an UpdateVBases parameter to UpdateEmptyClassOffsets. Not used just yet.Anders Carlsson2010-05-101-7/+11
| | | | llvm-svn: 103403
* More work on handling empty classes.Anders Carlsson2010-05-101-8/+14
| | | | llvm-svn: 103402
* Cleanup.Anders Carlsson2010-05-091-5/+5
| | | | llvm-svn: 103370
* Actually compute the empty subobject sizes. No functionality change yet.Anders Carlsson2010-05-081-3/+55
| | | | llvm-svn: 103363
* Add a SizeOfLargestEmptySubobject member to ASTRecordLayout. For C++ classes ↵Anders Carlsson2010-05-081-11/+13
| | | | | | this will hold the largest empty subobject or 0 if the class doesn't have any empty subobjects. llvm-svn: 103359
* AST: Dump ASTRecordLayout objects when they are created with ↵Daniel Dunbar2010-04-191-12/+25
| | | | | | -fdump-record-layouts. llvm-svn: 101815
* Fix -Wcast-qual warnings.Dan Gohman2010-04-191-1/+1
| | | | llvm-svn: 101786
* If a wide bit-field is inside a union its offset should always be 0.Anders Carlsson2010-04-171-4/+7
| | | | llvm-svn: 101668
* Add raw_ostream operators to NamedDecl for convenience. Switch over all ↵Benjamin Kramer2010-04-171-3/+2
| | | | | | | | users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. llvm-svn: 101632
* Remove printfs.Anders Carlsson2010-04-161-6/+0
| | | | llvm-svn: 101470
* More work on wide bit-fields, WIP.Anders Carlsson2010-04-161-0/+65
| | | | llvm-svn: 101467
* Rename the ASTContext member 'Context'.Anders Carlsson2010-04-161-34/+34
| | | | llvm-svn: 101462
* Split adding the primary virtual base offsets out into a separate pass. This ↵Anders Carlsson2010-04-151-34/+67
| | | | | | fixes a bug where we would lay out virtual bases in the wrong order. llvm-svn: 101373
OpenPOWER on IntegriCloud