Граф коммитов

22 Коммитов

Автор SHA1 Сообщение Дата
Benjamin Kramer d4f5198ae0 Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159719 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-04 18:45:14 +00:00
John McCall 441c6239c6 Add support for laying out vtordisps according to our current
working knowledge of the Microsoft ABI.  Based on a patch by
Dmitry Sokolov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155905 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01 08:55:32 +00:00
Eli Friedman 227e483cb1 More ASTRecordLayout changes for MS ABI; based on patch by r4start.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142694 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-21 22:49:56 +00:00
Eli Friedman 2fe363622c Some changes to improve compatibility for MSVC-style C++ struct layout. Patch from r4start at gmail.com (with some minor modifications by me).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140623 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 19:12:27 +00:00
Ken Dyck dac54c124e Convert RecordLayout::Alignment to CharUnits from bit units. No change in
functionality intended. 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125549 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 02:32:40 +00:00
Ken Dyck ec29903513 Convert RecordLayout::DataSize to CharUnits from bits, eliminating two
unnecessary calls to RoundUpToAlignment. No changes to functionality
intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125356 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-11 02:20:09 +00:00
Ken Dyck 5f022d8269 Convert RecordLayout::Size to CharUnits from bits. No changes to
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125156 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 01:59:34 +00:00
Ken Dyck 68cf1a5a01 Convert RecordLayout::NonVirtualAlign to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125069 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-08 02:02:47 +00:00
Ken Dyck 5c3633fa57 Convert RecordLayout::NonVirtualSize from bit units to CharUnits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124646 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 01:52:10 +00:00
Jay Foad 4ba2a17694 PR3558: mark "logically const" accessor methods in ASTContext as const,
and mark the fields they use as mutable. This allows us to remove a few
const_casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123314 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-12 09:06:06 +00:00
Anders Carlsson 0b9fb2f6b4 Remove the PrimaryBaseInfo class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120134 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-24 23:20:19 +00:00
Anders Carlsson c9e814ba19 Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120133 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-24 23:12:57 +00:00
Anders Carlsson 3069a0d286 Port over a couple of getVBaseClassOffsetInBits call sites to use getVBaseClassOffset instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117882 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-31 23:45:59 +00:00
Anders Carlsson a14f597957 Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-31 23:22:37 +00:00
Anders Carlsson a3d4380d66 EmptyObjectMap now uses CharUnits wherever possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117877 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-31 22:13:23 +00:00
Argyrios Kyrtzidis 42f81e674b Plug leak. The DenseMaps of CXXRecordLayoutInfo weren't freed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112006 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 00:32:19 +00:00
Anders Carlsson 28fdd0a8b4 No need to use the PrimaryBaseInfo struct in the builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104681 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 05:20:58 +00:00
Anders Carlsson c3fddeb438 Add a SizeOfLargestEmptySubobject member to ASTRecordLayout. For C++ classes this will hold the largest empty subobject or 0 if the class doesn't have any empty subobjects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103359 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 22:35:05 +00:00
Anders Carlsson 147b5ddc6c Replace the class offset vectors in RecordLayoutBuilder with maps instead so we'll have faster lookup and so we can detect duplicates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98231 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 04:10:39 +00:00
Anders Carlsson b6ee4b0146 Assert that primary bases always have offset 0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98223 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 01:49:18 +00:00
Benjamin Kramer bb9357cf8f Replace copy loops with memcpy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98055 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 12:53:38 +00:00
Ted Kremenek 503524acc7 Allocate ASTRecordLayout objects using the allocator associated with ASTContext.
This allows them to be allocated using a BumpPtrAllocated
in the common case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97978 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 20:56:29 +00:00