aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGRecordLayoutBuilder.cpp
AgeCommit message (Collapse)Author
2010-04-05IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out ↵Daniel Dunbar
of CodeGenTypes, to per-record CGRecordLayout structures. - I did a cursory check that this was perf neutral, FWIW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99978 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking ↵Daniel Dunbar
field and bit-field info as structs. - Anders, please check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99977 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31IRGen: Hide CGRecordLayoutBuilder class, because I can.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99967 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30IRgen: Move CGRecordLayout to its own happy little file.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99945 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02Improve handling of emitting 'null' pointers to data members.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95066 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28Fix an incorrect union layout assert. Fixes PR6164.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94754 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08No need to add tail padding if the resulting LLVM struct type will have the ↵Anders Carlsson
same size as the final record size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90820 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30Have ASTRecordLayout keep track of the key function, in preparation of ↵Anders Carlsson
fixing a synthetic ctor/dtor bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90168 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20Fixup key function calculations.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89412 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19This doesn't work yet.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89307 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06Prevent a code gen. crash on empty unions - pr5408.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86287 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12Store the key function of a record decl inside CGRecordLayout.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03If the alignment of the chosen field in a union is greater than the ↵Anders Carlsson
alignment of the union, we need to use a packed LLVM struct. Fixes <rdar://problem/7184250>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02Packed unions should be packed. Fixes an assert Daniel reported.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80808 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23More work towards zero-initializing structs that contain member pointers in ↵Anders Carlsson
constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79799 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13Update for LLVM API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08Take #pragma pack into account when laying out structs. Fixes ↵Anders Carlsson
rdar://problem/7095436. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08Introduce a new PragmaPack attribute, and use it for #pragma pack. The ↵Anders Carlsson
PackedAttr now only represents __attribute__((packed)). This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08Assert that the LLVM type has the same size as the RecordDecl size.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05Update for LLVM API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-04Simplify alignment handling in the record builder.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29No longer need to keep base class offsets in the offsetFariborz Jahanian
table as it has its own place now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28More CGRecordLayoutBuilder cleanup.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77335 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27Some minor changes toward support of dataFariborz Jahanian
member access in the presense of non-virtual bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27Enable the new struct type builder now that the constant struct builder ↵Anders Carlsson
works. (The old code will still be there until we know that everything works well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27Fix a tail padding bug in the record layout builder code. The bug was found ↵Anders Carlsson
by an existing test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24Check in a half finished new constant struct builder (Obviously not used yet).Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24Get rid of the size parameter to AppendField. No functionality change.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76931 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Don't just store the field/bit field info one field, do it for all fields in ↵Anders Carlsson
the union. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76907 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Fix another thinko.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76903 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Correct a thinko in bitfield layout code. Fixes PR4611.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23We don't need to keep track of the packed alignment, just whether the struct ↵Anders Carlsson
is packed or not. Fixes PR4610. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76884 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Move the LLVM field number for bit fields into the BitFieldInfo structure, ↵Anders Carlsson
since it's meaning is completely different than for non-bit fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76882 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Set field info for unions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76856 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Handle zero width bit fields in unions correctly (by ignoring them).Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76847 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Implement union layout support.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Check in CGRecordLayoutBuilder which is a reimplementation of the record ↵Anders Carlsson
layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76845 91177308-0d34-0410-b5e6-96231b3b80d8