History log of /external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4967a710c84587c654b56c828382219c3937dacb 20-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master Clang for rebase to r275480

Bug: http://b/31320715

This merges commit ac9cc4764cf47a6c3f031687d8592e080c9f5001 from
aosp/dev.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: Ic2875e5c3673c83448cd7d1013861e42947b1b55
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
87d948ecccffea9e9e37d0d053b246e2d6d6c47b 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r256229

http://b/26987366

Change-Id: I5d349c9843ea5c24d6e455956f8a446393b6873d
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
b6d6993e6e6d3daf4d9876794254d20a134e37c2 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r239765

Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
2f2fb5a304d96443fdcab70ba909346b96757d8b 15-Nov-2013 Hans Wennborg <hans@hanshq.net> Fix typo in CGRecordLayoutBuilder.cpp: s/Field/Fields/ in comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
58656de61dd044410ad2e9f36b20dfd988400120 30-Oct-2013 Warren Hunt <whunt@google.com> Minor efficiency refactor related to 193661. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
1f600171fdd68568507a77291637dd5173dd0885 30-Oct-2013 Warren Hunt <whunt@google.com> Fixing code gen to handle microsoft layouts for which size % alignment
!= 0



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
b2969b1e50580344891a98f5b241f8351fe371cf 11-Oct-2013 Warren Hunt <whunt@google.com> Adds Microsoft compatiable C++ record layout code to clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c250192494e0fa63be50269d2c1eb7786f8ab7a0 13-Jul-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Changes so that a few tests do not fail when running under guarded malloc.

Guarded malloc emits some messages at the beginning in stderr when enabled.
These messages caused a few tests to fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
cd06f26835033e879a9278941f4f6e6a4086976d 26-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Rewrite record layout for ms_struct structs.

The old implementation of ms_struct in RecordLayoutBuilder was a
complete mess: it depended on complicated conditionals which didn't
really reflect the underlying logic, and placed a burden on users of
the resulting RecordLayout. This commit rips out almost all of the
old code, and replaces it with simple checks in
RecordLayoutBuilder::LayoutBitField.

This commit also fixes <rdar://problem/14252115>, a bug where class
inheritance would cause us to lay out bitfields incorrectly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
64aa4b3ec7e62288e2e66c1935487ece995ca94b 17-Apr-2013 John McCall <rjmccall@apple.com> Standardize accesses to the TargetInfo in IR-gen.

Patch by Stephen Lin!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
b8b2c9da87e7d70a1679db026f40548b3192b705 25-Jan-2013 John McCall <rjmccall@apple.com> First pass at abstracting out a class for the target C++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
ed6355d56cbeb1cd1a77cc46e0a519af25523ccb 16-Jan-2013 David Greene <greened@obbligato.org> Fix signed/unsigned Compare

Do some casting to avoid a signed/unsigned compare.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
3b844ba7d5be205a9b4f5f0b0d1b7978977f4b8c 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to
reflect the migration in r171366.

Re-sort the #include lines to reflect the new paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
6bd120387a0d36bb5a748d4100b3eaa399eb53c5 18-Dec-2012 Eli Bendersky <eliben@google.com> Fix a compilation warning with gcc 4.6


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
b50d7a35c2f55be382d462a02fd4e21d6b582162 09-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Cleanup and fix an assert that was mis-firing.

Note that there is no test suite update. This was found by a couple of
tests failing when the test suite was run on a powerpc64 host (thanks
Roman!). The tests don't specify a triple, which might seem surprising
for a codegen test. But in fact, these tests don't even inspect their
output. Not at all. I could add a bunch of triples to these tests so
that we'd get the test coverage for normal builds, but really someone
needs to go through and add actual *tests* to these tests. =[ The ones
in question are:

test/CodeGen/bitfield-init.c
test/CodeGen/union.c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
ef8d516e7e015a905ca72ce99590803ca7c7e8f3 09-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Fix the bitfield record layout in codegen for big endian targets.

This was an egregious bug due to the several iterations of refactorings
that took place. Size no longer meant what it original did by the time
I finished, but this line of code never got updated. Unfortunately we
had essentially zero tests for this in the regression test suite. =[

I've added a PPC64 run over the bitfield test case I've been primarily
using. I'm still looking at adding more tests and making sure this is
the *correct* bitfield access code on PPC64 linux, but it looks pretty
close to me, and it is *worlds* better than before this patch as it no
longer asserts! =] More commits to follow with at least additional tests
and maybe more fixes.

Sorry for the long breakage due to this....

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
72d2dab6058467036df73a5f668036a519043e5b 06-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Rework the bitfield access IR generation to address PR13619 and
generally support the C++11 memory model requirements for bitfield
accesses by relying more heavily on LLVM's memory model.

The primary change this introduces is to move from a manually aligned
and strided access pattern across the bits of the bitfield to a much
simpler lump access of all bits in the bitfield followed by math to
extract the bits relevant for the particular field.

This simplifies the code significantly, but relies on LLVM to
intelligently lowering these integers.

I have tested LLVM's lowering both synthetically and in benchmarks. The
lowering appears to be functional, and there are no really significant
performance regressions. Different code patterns accessing bitfields
will vary in how this impacts them. The only real regressions I'm seeing
are a few patterns where the LLVM code generation for loads that feed
directly into a mask operation don't take advantage of the x86 ability
to do a smaller load and a cheap zero-extension. This doesn't regress
any benchmark in the nightly test suite on my box past the noise
threshold, but my box is quite noisy. I'll be watching the LNT numbers,
and will look into further improvements to the LLVM lowering as needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
5f608aedb6c5d32d2f7c51f9354a75b21f1eeaee 13-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Make -mms-bitfields behave consistently.

Patch by Jeremiah Zanin.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
25a6a84cf5067b32c271e3ba078676dee838798d 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
f4bcfa1b1850711d5eb092f2b0639331ef9f09f1 27-Jun-2012 Eli Friedman <eli.friedman@gmail.com> Propagate lvalue alignment into bitfields. Per report on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
581deb3da481053c4993c7600f97acf7768caac5 06-Jun-2012 David Blaikie <dblaikie@gmail.com> Revert Decl's iterators back to pointer value_type rather than reference value_type

In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
441c6239c6df8c759bacf6510efbfd434b647066 01-May-2012 John McCall <rjmccall@apple.com> 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
262bc18e32500558af7cb0afa205b34bd37bafed 30-Apr-2012 David Blaikie <dblaikie@gmail.com> Remove the ref/value inconsistency in filter_decl_iterator.

filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.

This change errs on the side of value, making op-> return T* and op* return
T&.

(reviewed by Richard Smith)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c8f11e9b4b627a85aa83f74474327254d958cf8d 27-Apr-2012 Eli Friedman <eli.friedman@gmail.com> Add a missing check in CodeGen of packed classes with vtables. <rdar://problem/11324125>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
77889c43b73a99aae82e7ede01baa08a60b6976b 04-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Silence a GCC warning about a set-but-not-used variable in release builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
89e6e85f1a6c4972ece0b68950673735daec970a 13-Jan-2012 Eli Friedman <eli.friedman@gmail.com> A base subobject type doesn't make sense for unions; don't try to compute it. Based on patch by Yin Ma. Fixes PR11751.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
fa2b3dd31c2fa32f10156e3cbbc8d0cfa2879d03 13-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Make CGRecordLayoutBuilder correctly switch over to a packed class when a class has a base whose alignment will break the class layout. <rdar://problem/10551376>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
26e80cdfe8933a7f804e1d05b379d5ad50119db5 07-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Make sure we correctly zero-initialize unions containing a pointer to data member as the first field. PR11487.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
9da235244c2de2bcca654b518c66133c30ebde53 08-Nov-2011 John McCall <rjmccall@apple.com> Fix the layout of vb-tables and vf-tables in the MS C++ ABI.
Based on work by Dmitry Sokolov!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
97c0aefe8c0523417ffe8a500a220286e11e7a46 18-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Rewrite parts of MS ABI C++ layout. Based on work by r4start; I ended up doing this while I was trying to review his patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
a6b8b2c09610b8bc4330e948ece8b940c2386406 10-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation refactoring:
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
bcfd1f55bfbb3e5944cd5e03d07b343e280838c4 02-Sep-2011 Douglas Gregor <dgregor@apple.com> Extend the ASTContext constructor to delay the initialization of
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c1c20114a401e503c07d68c47e0728bb063f35c8 12-Aug-2011 Chris Lattner <sabre@nondot.org> switch clang to use the new-new way of creating llvm::StructType's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
2acc6e3feda5e4f7d9009bdcf8b1cd777fecfe2d 18-Jul-2011 Chris Lattner <sabre@nondot.org> de-constify llvm::Type, patch by David Blaikie!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
9cbe4f0ba01ec304e1e3d071c071f7bca33631c0 09-Jul-2011 Chris Lattner <sabre@nondot.org> clang side to match the LLVM IR type system rewrite patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
e26bdb91b7e3912ffe895b78a446db94471a59dd 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> IRgen: Add a -fuse-register-sized-bitfield-access option, for testing.
- Changes bit-field access policy to try to use (aligned) register sized accesses.

The idea here is that by using larger accesses we expose more coalescing
potential to the backend when we have situations like adjacent bit-fields in the
same structure (which is common), and that the backend should be smart enough to
narrow the accesses down when no coalescing is done or when it is shown not to
be profitable.

--
$ clang -m32 -O3 -S -o - t.c
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movb (%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, (%eax)
movb 1(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 1(%eax)
movb 2(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 2(%eax)
movb 3(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 3(%eax)
popl %ebp
ret

$ clang -m32 -O3 -S -o - t.c -Xclang -fuse-register-sized-bitfield-access
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl $-2139062144, %ecx ## imm = 0xFFFFFFFF80808080
andl (%eax), %ecx
orl $16843009, %ecx ## imm = 0x1010101
movl %ecx, (%eax)
popl %ebp
ret
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
575a1c9dc8dc5b4977194993e289f9eda7295c39 20-May-2011 Douglas Gregor <dgregor@apple.com> Introduce Type::isSignedIntegerOrEnumerationType() and
Type::isUnsignedIntegerOrEnumerationType(), which are like
Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also
consider the underlying type of a C++0x scoped enumeration type.

Audited all callers to the existing functions, switching those that
need to also handle scoped enumeration types (e.g., those that deal
with constant values) over to the new functions. Fixes PR9923 /
<rdar://problem/9447851>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
855a8e79f42e670b405b31efd3963f4d89732aff 03-May-2011 Fariborz Jahanian <fjahanian@apple.com> Finish off rules for z-length bitfields in ms_struct
structs. // rdar://8823265


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
340fa242130c2d8d74c83edca0952e771aebe0e6 02-May-2011 Fariborz Jahanian <fjahanian@apple.com> More rule enforcement of zero bitfields for ms_struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
14d56ef43ff4921c6749f7340212fbb743fdbb9b 27-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Some refactoring of my ms_struct patch.
// rdar://8823265 related.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
62055b0618fafb4747e783ba3fedd7bc7d57d27d 27-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> With ms_struct attribut, Zero-length bitfields following
non-bitfield members are ignore. // rdar://8823265 wip


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
3256de709a69572be90e9c8855fafb58c4d93d10 24-Apr-2011 Ken Dyck <kd@kendyck.com> Simplify AppendTailPadding() by converting its parameter to CharUnits. No
change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
737978d336ea8bbb27cc7a3c9cb5eeb2b7dea8a5 24-Apr-2011 Ken Dyck <kd@kendyck.com> Eliminate literal 8s from LayoutUnionField by converting NumBytesToAppend to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
edda6e432789b7a668c86573fd5881342b9f6e27 24-Apr-2011 Ken Dyck <kd@kendyck.com> Eliminate literal 8s from LayoutBitField(), converting variables to
CharUnits or replacing the 8s with char align. No change in functionality
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
b9e6b2c215d0a7930ad160b054bc86353da4a517 24-Apr-2011 Ken Dyck <kd@kendyck.com> Convert AccessInfo::AccessAlignment to CharUnits. No change in functionality
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
28ebde58dd94b5ed2a6d149251202ab2c602a4a6 24-Apr-2011 Ken Dyck <kd@kendyck.com> Convert CGBitFieldInfo::FieldByteOffset to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
eb9d81dff99d4996f41c93ce71b08aaf753cbae8 17-Apr-2011 Anders Carlsson <andersca@mac.com> When laying out bases in, always try the "base subobject" LLVM type. If it
turns out that a field or base needs to be laid out in the tail padding of
the base, CGRecordLayoutBuilder::ResizeLastBaseFieldIfNecessary will convert
it to an array of i8.

I've audited the new test results to make sure that they are still valid. I've
also verified that we pass a self-host with this change.

This (finally) fixes PR5589!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
2786a81415c43cf3110d197b20987c352edbd0fe 17-Apr-2011 Anders Carlsson <andersca@mac.com> Use a SmallVector for field types in CGRecordLayoutBuilder now that llvm::StructType::get takes an ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c3e494047b921529ce01c5b77c0a7f81eec8a300 22-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Fix typo in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
92ee7ca6f42d2bd735f9bfc120c00838c4e469c0 26-Feb-2011 John McCall <rjmccall@apple.com> A much-delayed response to Ken Dyck's review: make this somewhat more
char-width agnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
d8df5b65fc76c2f59148e1551f56a8ee26c9607b 17-Feb-2011 Chris Lattner <sabre@nondot.org> improve support for big endian targets, fixing PR8171, patch
by Heikki Kultala!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
fd577d6b71d82d16b3c67f307bec948b7a0a84b2 15-Feb-2011 John McCall <rjmccall@apple.com> Refactor CGRecordLayoutBuilder to use CharUnits more consistently.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
9b7da1c46d6d2849f9cb51328d7fcddf2c417672 15-Feb-2011 John McCall <rjmccall@apple.com> Perform zero-initialization of virtual base classes when emitting
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
dac54c124e302d6f028ea5723c425b7f66fc7c71 15-Feb-2011 Ken Dyck <kd@kendyck.com> 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
dd76a9ab9ea675671200f94b18ce95766841952b 11-Feb-2011 Ken Dyck <kd@kendyck.com> Add a helper function, ASTContext::toBits(), that converts sizes in
CharUnits to sizes in bits, and use it to tidy up the places where the
conversion was done explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
9186ff310cf0ad92ec7f39b2c9dcb7e848195052 10-Feb-2011 Ken Dyck <kd@kendyck.com> Drop the 'InBits' part from the name of RecordSizeInBits as the value is in
character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
7198e94d55213222044515d5a83713911d0c6dbb 10-Feb-2011 Ken Dyck <kd@kendyck.com> Eliminate some signed-to-unsigned comparision warnings introduced in
r125156.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
5f022d82696c84e4d127c558871d68ac6273274e 09-Feb-2011 Ken Dyck <kd@kendyck.com> 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
68cf1a5a01ba43ed56a8624632fd65e0804430ac 08-Feb-2011 Ken Dyck <kd@kendyck.com> 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
5c3633fa57f27b0909ab5767715c4e66b8920165 01-Feb-2011 Ken Dyck <kd@kendyck.com> 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
db2b42fb4d43be5af14ba33d49bbd163f01646ec 10-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix another obscure corner layout case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
860453c4b4768e99d72f5833771c508e6ef00cc6 05-Dec-2010 Anders Carlsson <andersca@mac.com> Add a LayoutBase member function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
57d2d236d24de0edb7e51b86d88c0eb970330650 05-Dec-2010 Anders Carlsson <andersca@mac.com> Replace calls to AppendBytes with calls to AppendPadding when the bytes appended are padding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
d0de0ce304b3fcdda0fe081da2974420ee6f14e7 01-Dec-2010 John McCall <rjmccall@apple.com> CGRecordLayoutBuilder does not need to be exported from this module.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
fc86d55b6b20c47f67a61afa4b3903eb0d31f9b8 29-Nov-2010 Anders Carlsson <andersca@mac.com> Don't store the maximum alignment, we can trivially compute it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
1d7dc2240717eb34672035b13ceb17710ab481c1 28-Nov-2010 Anders Carlsson <andersca@mac.com> More work on laying out virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
8f2c6899dd14023555808dbdcbe7e371c3fb2cc2 25-Nov-2010 Anders Carlsson <andersca@mac.com> Begin work on actually laying out virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c9e814ba193f38a7b08268612248f63beb279bb3 25-Nov-2010 Anders Carlsson <andersca@mac.com> Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
46170f9c7d561d0f94af34a4b5da909d2584370a 24-Nov-2010 Anders Carlsson <andersca@mac.com> Add CXXRecordDecl::getIndirectPrimaryBases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
3379e9bd71c0e0051bd97e90d4f2ec964078091d 24-Nov-2010 Anders Carlsson <andersca@mac.com> Simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
ba2c2eec87d614b06e194b289627bbfe0642e4ce 24-Nov-2010 Anders Carlsson <andersca@mac.com> CGRecordLayout types are always struct types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
a03613d6e3f38e0ea8f5ebf0d7c9039b9fe35a8d 22-Nov-2010 Anders Carlsson <andersca@mac.com> Remove FIXME; we don't ever want to lay out empty bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
9a5a3f2f3bc7048160b50dadeb7fa56e5e9d8385 22-Nov-2010 Anders Carlsson <andersca@mac.com> Rename BaseLLVMType to NonVirtualBaseLLVMType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
f4a15b0df4c8e8b012aa33f5f2f182871efb9dd0 22-Nov-2010 Anders Carlsson <andersca@mac.com> Add getCGRecordLayout helper function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
cb0511cc291a2f1b6ba281b818f3d07184e198b7 09-Nov-2010 Nick Lewycky <nicholas@mxc.ca> Remove debugging printf.
Fix linux build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
3d155e683a74d3783362ef1865be91544eb8a9fc 09-Nov-2010 Anders Carlsson <andersca@mac.com> Introduce the concept of a non-virtual base type to CGRecordLayoutBuilder as a first step towards fixing PR6995.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
a14f5979572aa25c03d24750ee4724d2031d4ede 01-Nov-2010 Anders Carlsson <andersca@mac.com> 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
e7a80bd66a80ce509de9b50f32cdd402914edd2e 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move CGBitFieldInfo strategy computation helpers to static member
functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
f16aa103d3afd42fbca2ab346f191bf745cec092 22-Aug-2010 John McCall <rjmccall@apple.com> Go back to asking CodeGenTypes whether a type is zero-initializable.
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
8a2c92cab213bd7e28ff669577e815cd70bafbe3 27-May-2010 Daniel Dunbar <daniel@zuster.org> AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
a83fb4bf8119b980ccf7de0795dff250a799ea58 18-May-2010 Anders Carlsson <andersca@mac.com> Correctly initialize bases with member pointers. This should fix PR6441 but that test case is a bit weird and I'd like to investigate further before closing that bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c6772ce9c80ff524c7c522b5f0b37de58786bd84 18-May-2010 Anders Carlsson <andersca@mac.com> Keep track of the LLVM field numbers for non-virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
15ddfdc5d8929556c07ea7341006b31c71544325 18-May-2010 Anders Carlsson <andersca@mac.com> Start laying out bases as individual fields. We still use ugly i8 arrays but this is a step in the right direction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
68e3013ade8a219625b636bb8c1dcec2ba6fb685 05-May-2010 Anders Carlsson <andersca@mac.com> Use a more appropriate LLVM type for the vtable pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
52968a1c765e43000f904ecb27a6353b0185bcd6 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix another case where we generated an invalid access component when we
immediately narrowed the access size. Fix this (and previous case) by just
choosing a better access size up-front.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
4651efb5ba5710c91b58c8b86872b264dd71f464 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix case where we might generate an access component with width == 0, if
we have to narrow the access side immediately (can happen with packed,
-fno-bitfield-type-align).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
89da874f8ecfebabdac2c6e9b7930ebe179ccf81 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Set alignment correctly on bit-field accesses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
e1467a4ceeeb74cdc54830e03df8d58893e38892 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Rewrite bit-field access policy to not access data beyond the bounds 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
ad759530ff48385255c25e71d7e05632361e0c11 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix CGRecordLayout::print to print the bit-field infos in a consistent order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
3b2ae7ae59b11657416fc3f16e742713b4683e5e 21-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add checking that the LLVM and AST record layout offsets agree (for
non-bit-fields).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
8ab78a7d9d755975db67170cae64c05d5176c00c 20-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Always use i8 arrays to access union bit-fields. This is ugly, but
matches how we currently handle structs, and this correctly handles
-fno-bitfield-type-align.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
8d8ab749f6f8bb63ea2cd2b589c0f050b67fc5cc 19-Apr-2010 Daniel Dunbar <daniel@zuster.org> AST: Dump ASTRecordLayout objects when they are created with -fdump-record-layouts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
2e7b7c2f267e0bf8047608aa1cd6691c0bf86792 19-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Kill unused function and move the type match assert to after record dumping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
6ba38151f7e31d7f9194c8bbb91229cb5ffbb6f4 18-Apr-2010 Anders Carlsson <andersca@mac.com> Simplify wide bit-field layout in CGRecordLayoutBuilder, and also fix a bug where assigning to a bit-field member would overwrite other parts of the struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
d62328e6a0fa933e3a5daaf68e4964031e6c5c5e 17-Apr-2010 Anders Carlsson <andersca@mac.com> Unnamed bit-fields in a union should be laid out with a type that doesn't affect alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
86664465bac330871d4a476f68a1d6f7f6f102af 17-Apr-2010 Anders Carlsson <andersca@mac.com> Factor union field layout code out into a separate function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
046c294a43024874ff35656c6e785b64e72f1f36 17-Apr-2010 Anders Carlsson <andersca@mac.com> Vtable -> VTable renames across the board.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
1c7658fd32f26a3ea5fa1421494b2449c9eba3c9 16-Apr-2010 Anders Carlsson <andersca@mac.com> Make CGRecordLayoutBuilder deal with wide bit-fields. Will land tests shortly (Daniel, please review).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
2df2569679237b4979654a8663cd61aea67ab207 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Change CGBitFieldInfo to take the AccessInfo as constructor arguments, it is now an immutable object.

Also, add some checking of various invariants that should hold on the CGBitFieldInfo access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
7fb619500404129322af972aab66c369949a2a74 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Eliminate now unused fields from CGBitFieldInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
ab970f90ce31a53fe7e6375a37536bf0832fd922 13-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Enhance CGBitFieldInfo with enough information to fully describe the "policy" with which a bit-field should be accessed.
- For now, these policies are computed to match the current IRgen strategy, although the new information isn't being used yet (except in -fdump-record-layouts).

- Design comments appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
9b28daf9b6ea3808ef6b63408c24095a43d48018 12-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Factor out ComputeBitFieldInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
93c62967d4ac7620a8ed2c5f875daab9adb416f0 12-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CGRecordLayout::dump, and dump (irgen) record layouts as part of -fdump-record-layouts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
7f2896406c8f14bf123578610043a919ba1a1c8a 08-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move the bit-field access type into CGBitFieldInfo, and change bit-field LValues to just store the base address of object containing the bit-field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
efbf487da83883c2da81181cac6f040928aa4289 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c7a984af71394402cb4d149554ab5da11aebd729 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
2eec0b2e3e931de6cefbb266a7652a0622fe95b2 05-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
198bcb44b6271c92fd856403f34b518828100aac 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
490fc902710eca4e4a07b2ecaa223e70670331d6 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
270e203b50ed8791e61afd357596bcf050cf2bfd 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRGen: Hide CGRecordLayoutBuilder class, because I can.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
2924ade97ee4228fcf3518d89cd4bd1653236b48 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move CGRecordLayout to its own happy little file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
2c12d0319a267b844cb7d569d84426cd344b90f7 02-Feb-2010 Anders Carlsson <andersca@mac.com> Improve handling of emitting 'null' pointers to data members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
21fd7d7347358994ee6d944c22a51e82d22409d9 28-Jan-2010 Anders Carlsson <andersca@mac.com> Fix an incorrect union layout assert. Fixes PR6164.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
4b3e5be334c93c3f48af2a49c0ea7cd9bae2a0e5 16-Dec-2009 Anders Carlsson <andersca@mac.com> Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c2456824a106455bae5d738fe65d80b14a6804c4 08-Dec-2009 Anders Carlsson <andersca@mac.com> No need to add tail padding if the resulting LLVM struct type will have the same size as the final record size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
1a5e0d7f18485e4fb958f96dcddff3e4486a4069 01-Dec-2009 Anders Carlsson <andersca@mac.com> Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
a84b4044b79f2cc424c6ae7ee5edb97e948ba806 20-Nov-2009 Mike Stump <mrs@apple.com> Fixup key function calculations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
88bd0094d8784b0a6a785ddeca18e5061417dcce 19-Nov-2009 Mike Stump <mrs@apple.com> This doesn't work yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
e504170f688b0e2113011839b933a4ec450b5182 06-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Prevent a code gen. crash on empty unions - pr5408.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
5017a157c6c5462ea1d4154d7d758ee3d277b735 12-Oct-2009 Anders Carlsson <andersca@mac.com> Store the key function of a record decl inside CGRecordLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
366200045fc30290795e037ab2cb417ddd3c9933 04-Sep-2009 Anders Carlsson <andersca@mac.com> If the alignment of the chosen field in a union is greater than the 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
d0eb3b93e89f0ab83a2305eb0ec42076f8d46142 02-Sep-2009 Anders Carlsson <andersca@mac.com> Packed unions should be packed. Fixes an assert Daniel reported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
fc3eaa47fa2ef70ab21131005c328adda3020737 23-Aug-2009 Anders Carlsson <andersca@mac.com> More work towards zero-initializing structs that contain member pointers in constant expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
341bdf8d565f5282779a0ffd2d2b77f3a38b735e 23-Aug-2009 Anders Carlsson <andersca@mac.com> Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
0032b2781b4deb131f8c9b7968f2030bf2489cdd 13-Aug-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
a5dd722bdf2f74a1a249fe6661d96a7236aee0f0 08-Aug-2009 Anders Carlsson <andersca@mac.com> Take #pragma pack into account when laying out structs. Fixes rdar://problem/7095436.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
a860e755f1f9f071b6a6a2f96128a6a258f5c331 08-Aug-2009 Anders Carlsson <andersca@mac.com> Introduce a new PragmaPack attribute, and use it for #pragma pack. The 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
df31e091126da6a5c08303a78b562d00e7fd4e20 08-Aug-2009 Anders Carlsson <andersca@mac.com> Assert that the LLVM type has the same size as the RecordDecl size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
47a434ff3d49e7906eda88e8e8242e4297725b32 06-Aug-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
de9f2c937a4892d155cfe695657ce4cc3556836f 04-Aug-2009 Anders Carlsson <andersca@mac.com> Simplify alignment handling in the record builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
8a8a629844d26c24dc0147d55a32a937b14b9381 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> No longer need to keep base class offsets in the offset
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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c2cc1d5e29596f2ee2f32ca9c06f9119904dd161 28-Jul-2009 Anders Carlsson <andersca@mac.com> More CGRecordLayoutBuilder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
cad86653942d4e33c2674ea40e77d7fe59990130 27-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Some minor changes toward support of data
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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
abdad358b53d0efd1d89ea434b7078600a656d1f 27-Jul-2009 Anders Carlsson <andersca@mac.com> Enable the new struct type builder now that the constant struct builder 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
c1efe36ca75b4f4f82cdec464bab5693ed0d6058 27-Jul-2009 Anders Carlsson <andersca@mac.com> Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
4c98efdf06f94da20a640aa36f6a4f3284c26bff 24-Jul-2009 Anders Carlsson <andersca@mac.com> Check in a half finished new constant struct builder (Obviously not used yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
728d7cd2e25a0a1e5ff272163fc7ed17980f029a 24-Jul-2009 Anders Carlsson <andersca@mac.com> Get rid of the size parameter to AppendField. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
94ae95f17ed4155ca4718575f00eafa1bfb8c5a0 24-Jul-2009 Anders Carlsson <andersca@mac.com> Don't just store the field/bit field info one field, do it for all fields in the union.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
177d4d8700d66e80a874c3f609eede297118633d 23-Jul-2009 Anders Carlsson <andersca@mac.com> Fix another thinko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
faaec2234f21bf175dd05c723072202cdf39cb2f 23-Jul-2009 Anders Carlsson <andersca@mac.com> Correct a thinko in bitfield layout code. Fixes PR4611.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
4b5584b38b860e8ecb20420e2fe16d5ed97a68a0 23-Jul-2009 Anders Carlsson <andersca@mac.com> We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
8330ceeebb3bfac31116b387b90ff2ce3cef85e4 23-Jul-2009 Anders Carlsson <andersca@mac.com> Move the LLVM field number for bit fields into the BitFieldInfo structure, 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
cfc6758b5f62514445eead673a46a69d70162526 23-Jul-2009 Anders Carlsson <andersca@mac.com> Set field info for unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
2cc8f1740d88362292822e397db6085084399599 23-Jul-2009 Anders Carlsson <andersca@mac.com> Handle zero width bit fields in unions correctly (by ignoring them).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
5a6e398eafa48c56e8741ad2cd36630badd98f30 23-Jul-2009 Anders Carlsson <andersca@mac.com> Implement union layout support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
45372a6fdcd2b0840704569478db456822e02bae 23-Jul-2009 Anders Carlsson <andersca@mac.com> Check in CGRecordLayoutBuilder which is a reimplementation of the record 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
/external/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp