Commit Graph

33 Commits

Author SHA1 Message Date
Devang Patel
134b3f4b55 Add RecordOrganizer::layoutUnionFields()
llvm-svn: 43472
2007-10-29 20:50:19 +00:00
Devang Patel
ed93c3c3b3 Codegen union member references.
llvm-svn: 43390
2007-10-26 19:42:18 +00:00
Devang Patel
29e3824453 Cache llvm::Type through PATypeHolder.
llvm-svn: 43355
2007-10-25 18:32:36 +00:00
Devang Patel
bc50aab635 Move RecordOrganizer into CodeGenTypes.cpp
llvm-svn: 43310
2007-10-24 20:38:06 +00:00
Devang Patel
ea37aa7d64 Constify methods and reuse RecordOrganizer object.
llvm-svn: 43284
2007-10-24 00:56:23 +00:00
Devang Patel
f2423473b1 Add notes.
llvm-svn: 43282
2007-10-24 00:32:16 +00:00
Devang Patel
c4e224e59c untabify
llvm-svn: 43280
2007-10-24 00:26:24 +00:00
Hartmut Kaiser
5277af121a Fixed a strange construct, please review.
llvm-svn: 43278
2007-10-24 00:07:36 +00:00
Devang Patel
65c4afb940 Handle nested structs.
typdef struct A { int i; struct A *next; } A

llvm-svn: 43268
2007-10-23 23:26:46 +00:00
Devang Patel
3e11ccea96 Begin struct layout work.
llvm-svn: 43236
2007-10-23 02:10:49 +00:00
Fariborz Jahanian
da6c012ee7 Added a new class for Interfaces qualified by protocol list.
Protocols are now sorted and made unique in the list.
Enhanced pretty printer for @interface (So, I can see the protocol list).

llvm-svn: 42776
2007-10-08 23:06:41 +00:00
Chris Lattner
793d10ca38 fix some warnings, patch by Justin Handville
llvm-svn: 42010
2007-09-16 19:23:47 +00:00
Chris Lattner
fb2eb6941a eliminate some VC++ warnings, patch contributed by Hartmut Kaiser
llvm-svn: 41692
2007-09-04 02:34:27 +00:00
Steve Naroff
5c13180a27 Fix the following redefinition errors submitted by Keith Bauer...
[dylan:~/llvm/tools/clang] admin% cat tentative_decls.c 
// incorrectly generates redefinition error
extern int array[3];
int array[3];

// incorrectly generates a redefinition error
extern void nup(int a[3]);
void nup(int a[3]) {}

It turns out that this exposed a fairly major flaw in the type system,
array types were never getting uniqued! This is because all array types
contained an expression, which aren't unique.

To solve this, we now have 2 array types, ConstantArrayType and
VariableArrayType. ConstantArrayType's are unique, VAT's aren't.

This is a fairly extensive set of fundamental changes. Fortunately,
all the tests pass. Nevertheless, there may be some collateral damage:-)
If so, let me know!

llvm-svn: 41592
2007-08-30 01:06:46 +00:00
Chris Lattner
1c1f932433 Change EnumDecl to store its corresponding integer type
directly in it.  Remove TargetInfo::getEnumPolicy, as there is only
one policy that we support right now.

llvm-svn: 41548
2007-08-28 18:24:31 +00:00
Chris Lattner
304ff47b1a teach codegen to lay out enum types.
llvm-svn: 41501
2007-08-27 17:44:34 +00:00
Chris Lattner
e7a160b37d int X[] isn't a VLA. This improves support for stdio.h on darwin.
llvm-svn: 41423
2007-08-26 05:02:07 +00:00
Chris Lattner
57c269b5d3 implement rudimentary union layout support.
llvm-svn: 41421
2007-08-26 04:50:19 +00:00
Anders Carlsson
b04ea61b79 Implement code generation for constant CFStrings.
llvm-svn: 41206
2007-08-21 00:21:21 +00:00
Anders Carlsson
f087c0c1c6 Add preliminary support for converting struct types.
llvm-svn: 41145
2007-08-17 22:00:32 +00:00
Chris Lattner
acbd22aaec silence some warnings.
llvm-svn: 40761
2007-08-02 21:50:34 +00:00
Chris Lattner
2ac26568d4 silence a warning by treating ocuvectors the same as vectors.
llvm-svn: 40037
2007-07-19 05:13:51 +00:00
Chris Lattner
0e9d6226ca Refactor code so that isIntegerConstantExpr has an ASTContext available.
llvm-svn: 39884
2007-07-15 23:26:56 +00:00
Chris Lattner
4481b428db A significant refactoring of the type size stuff to also
compute type alignment.  This info is needed for struct layout.

llvm-svn: 39850
2007-07-14 01:29:45 +00:00
Chris Lattner
d2b88ab313 Implement codegen for + and - with pointers. Patch contributed by
Keith Bauer.

llvm-svn: 39793
2007-07-13 03:05:23 +00:00
Chris Lattner
6eea886b9e implement support for llvm codegen of vectors. That was much easier than
I expected :)

llvm-svn: 39720
2007-07-10 00:23:39 +00:00
Chris Lattner
c8c3dadaa0 fix codegen of void-returning functions
llvm-svn: 39693
2007-06-27 18:08:49 +00:00
Chris Lattner
54fb19efaa implement support for struct and complex returns.
llvm-svn: 39674
2007-06-22 22:02:34 +00:00
Chris Lattner
c6395936ae Split complex types out from being members of BuiltinType to being their own
types.

llvm-svn: 39672
2007-06-22 20:56:16 +00:00
Chris Lattner
f033c147c9 remove location tracking for target info
llvm-svn: 39671
2007-06-22 19:05:19 +00:00
Chris Lattner
3e3a1e9cda implement lowering of complex types
llvm-svn: 39668
2007-06-22 18:15:26 +00:00
Chris Lattner
e1e93a5e5d assert, don't crash, on int[]
llvm-svn: 39664
2007-06-20 17:12:11 +00:00
Chris Lattner
2052bc8107 Split type analysis out to its own file, now the integer constant expr evaluation
is ready.

llvm-svn: 39660
2007-06-16 00:12:05 +00:00