Lauro Ramos Venancio
bb733a2bdc
Implement review feedback. Use getAsPointerType instead of cast<PointerType>.
...
llvm-svn: 46613
2008-01-31 15:19:04 +00:00
Lauro Ramos Venancio
f5291d2871
A pointer to an opaque type is an "opaque type definition".
...
llvm-svn: 46575
2008-01-30 21:21:08 +00:00
Lauro Ramos Venancio
0ae6cd5219
Fix two bugs in bitfield codegen.
...
llvm-svn: 46255
2008-01-22 19:15:30 +00:00
Lauro Ramos Venancio
37bae3e8aa
Simplify the bitfield codegen.
...
llvm-svn: 46230
2008-01-21 22:54:57 +00:00
Chris Lattner
41a1ef0dfe
implement proper support for _Bool in memory, which is usually i8, not i1.
...
This fixes a crash reported by Seo Sanghyeon
llvm-svn: 45778
2008-01-09 18:47:25 +00:00
Ted Kremenek
1b0ea82459
Substituted all instances of the string "Objc" for "ObjC". This fixes
...
some naming inconsistencies in the names of classes pertaining to Objective-C
support in clang.
llvm-svn: 45715
2008-01-07 19:49:32 +00:00
Chris Lattner
5b12ab8c93
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change.
llvm-svn: 45410
2007-12-29 19:59:25 +00:00
Devang Patel
505b4f1fd4
Convert opaque type when struct definition is seen.
...
llvm-svn: 45287
2007-12-21 19:35:28 +00:00
Devang Patel
016e41e8a6
Keep track of llvm struct size while adding fields.
...
Update addPaddingFields() interface.
llvm-svn: 45284
2007-12-21 18:43:53 +00:00
Fariborz Jahanian
24cb52c9b0
Patch to implemented objective-c's dynamic object pointer qualified with
...
the protocol list (id<P,...> types).
llvm-svn: 45121
2007-12-17 21:03:50 +00:00
Christopher Lamb
77560fbde7
Update to use new PointerType::getUnqual() api.
...
llvm-svn: 45081
2007-12-17 01:11:20 +00:00
Devang Patel
527048247b
Add assert to detect incomplete implementation work.
...
llvm-svn: 44974
2007-12-13 01:24:16 +00:00
Devang Patel
e3f9fa6322
Refactor bit-field handling code into a separate method.
...
No functionality change.
llvm-svn: 44875
2007-12-11 19:51:39 +00:00
Devang Patel
7ae82e7305
Separate access field number is not required.
...
llvm-svn: 44833
2007-12-11 01:23:33 +00:00
Devang Patel
113bd8be70
Beautify comment.
...
llvm-svn: 44831
2007-12-11 00:54:19 +00:00
Devang Patel
ab6aadb34a
Add support to share llvm fields for bit-fields.
...
For example, struct { char a; short b:2; };
llvm-svn: 44830
2007-12-11 00:49:18 +00:00
Devang Patel
3c31b54b47
Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
...
llvm-svn: 44799
2007-12-10 18:37:40 +00:00
Devang Patel
bb5c0d8960
Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
...
llvm-svn: 44798
2007-12-10 18:25:34 +00:00
Devang Patel
65a2288eef
More struct bitfields layout work. Now handle,
...
struct STestB1 {char a; char b:2; } stb1;
struct STestB2 {char a; char b:5; char c:4} stb2;
llvm-svn: 44664
2007-12-06 19:16:05 +00:00
Chris Lattner
6eed001371
fix some bogus code noticed by Kevin Andre
...
llvm-svn: 44615
2007-12-05 17:21:34 +00:00
Christopher Lamb
7d303b2a20
Better match llvm-gcc's behavior for CodeGen naming of anonymous structs and unions.
...
llvm-svn: 44490
2007-12-01 09:20:34 +00:00
Christopher Lamb
b0e6094a22
When generating the CodeGen type name of a struct, union, enum use the typedef
...
name if a tag type name is not available for the type. This matches how llvm-gcc
chooses CodeGen type names.
This means that "typedef struct {...} foo" now results in a CodeGen name of
"struct.foo" rather than "struct."
llvm-svn: 44489
2007-12-01 09:08:41 +00:00
Chris Lattner
1cfe02c38b
update to match change in mainline llvm.
...
llvm-svn: 44367
2007-11-27 18:20:52 +00:00
Devang Patel
ec51171319
Add assert for the case that is not handled.
...
struct { char a; short b:2; };
llvm-svn: 43859
2007-11-08 00:32:12 +00:00
Devang Patel
7c7a07d949
Keep track of beginning offset for the bit field that does not start at byte boundry.
...
llvm-svn: 43857
2007-11-08 00:17:59 +00:00
Devang Patel
ef2d838fef
Stay within 80 columns.
...
llvm-svn: 43843
2007-11-07 21:04:59 +00:00
Devang Patel
b1ecfc6e25
Start struct bit field laout work.
...
This is far from complete.
llvm-svn: 43801
2007-11-07 01:57:13 +00:00
Devang Patel
e11664a0ef
Rename classes and collections that maintain record layout information.
...
Now, at AST level record info is maintained by ASTRecordLayout class.
Now, at code gen level record info is maintained by CGRecordLayout class.
llvm-svn: 43619
2007-11-01 19:11:01 +00:00
Devang Patel
0b59b45870
Remove unnecessary method.
...
llvm-svn: 43591
2007-11-01 00:11:37 +00:00
Devang Patel
ad175428c6
start adding pading fields.
...
llvm-svn: 43590
2007-11-01 00:07:12 +00:00
Devang Patel
f5fcb9870a
Refactor code into a separate method.
...
llvm-svn: 43587
2007-10-31 23:17:19 +00:00
Devang Patel
6029cbf872
Check whether next slot meets field type's alignment requirements.
...
If it does not then assert at the moment.
llvm-svn: 43576
2007-10-31 21:01:37 +00:00
Devang Patel
1c8788bbd0
Keep track of field offsets during structure layout.
...
Take 2.
llvm-svn: 43573
2007-10-31 20:08:22 +00:00
Devang Patel
75ef2f0b45
Take 2.
...
Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress.
At the moment target triplet and target description strings are hard coded in clang::TargetInfo
llvm-svn: 43572
2007-10-31 20:01:01 +00:00
Chris Lattner
5087e267c2
temporarily revert devang's patch to link in the llvm codegen etc.
...
llvm-svn: 43544
2007-10-31 04:53:03 +00:00
Devang Patel
df62bc067a
Keep track of field offsets during structure layout.
...
llvm-svn: 43539
2007-10-31 01:23:10 +00:00
Devang Patel
46c7003052
Make target info available to clang code generator.
...
This is far from complete but this helps clang codegen module
make progress.
llvm-svn: 43536
2007-10-31 00:59:29 +00:00
Devang Patel
82ae5f255f
Avoid unnecessary PATypeHolder copy.
...
llvm-svn: 43530
2007-10-30 23:22:14 +00:00
Devang Patel
ffe1e218f2
Fix 80 col violations.
...
llvm-svn: 43516
2007-10-30 20:59:40 +00:00
Devang Patel
f5bda316c5
Use
...
+ llvm::DenseMap<Type *, llvm::PATypeHolder> TypeHolderMap;
instead of
- llvm::DenseMap<Type *, llvm::PATypeHolder *> TypeHolderMap;
llvm-svn: 43514
2007-10-30 20:46:47 +00:00
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