Chris Lattner
b818af539f
now that ConvertTagDeclType is nice and simple, use it from UpdateCompletedType.
...
llvm-svn: 46809
2008-02-06 06:06:49 +00:00
Chris Lattner
56096f3020
rename TypeHolderMap to TypeCache, which more aptly describes what it is.
...
llvm-svn: 46804
2008-02-06 05:21:55 +00:00
Chris Lattner
ee9fafd533
split tagged decl layout into its own method.
...
llvm-svn: 46803
2008-02-06 05:18:32 +00:00
Chris Lattner
68be60694e
sink more of the type related code into CodeGenTypes.
...
llvm-svn: 46801
2008-02-06 05:08:19 +00:00
Chris Lattner
b1537ebdd4
rewrite some of the type refinement code to eliminate dangling pointers
...
simplify the code and generally make it more robust.
llvm-svn: 46745
2008-02-05 08:06:13 +00:00
Chris Lattner
86964a9653
Change the key of CGRecordLayouts from being an llvm type* to being a decl*. LLVM
...
Type*'s can change as types are refined, so we can't use them as a stable key in
the map. Decls don't change, so use them instead.
This patch was written by Anders, but he's too shy to commit it himself :)
llvm-svn: 46743
2008-02-05 06:55:31 +00:00
Devang Patel
a703a67384
Cleanup InitListExpr code generation code.
...
Handle padding fields while initializing struct (fix PR 1962)
llvm-svn: 46736
2008-02-05 02:39:50 +00:00
Lauro Ramos Venancio
2ddcb25a3b
Implement bitfield read.
...
llvm-svn: 46257
2008-01-22 20:17:04 +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
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
7ae82e7305
Separate access field number is not required.
...
llvm-svn: 44833
2007-12-11 01:23:33 +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
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
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
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
5ea6d7f1be
Document ConvertNewType() method and make it a private method.
...
llvm-svn: 43363
2007-10-25 21:40:12 +00:00
Devang Patel
29e3824453
Cache llvm::Type through PATypeHolder.
...
llvm-svn: 43355
2007-10-25 18:32:36 +00:00
Devang Patel
e85285b9f3
Remove unused #includes
...
llvm-svn: 43317
2007-10-24 23:42:18 +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
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
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
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
983a8bbbb2
Move getSize() out of type, into ASTContext, where it has target info, and
...
where ASTContext can manage caches for struct layout, etc.
llvm-svn: 39835
2007-07-13 22:13:22 +00:00
Chris Lattner
f033c147c9
remove location tracking for target info
...
llvm-svn: 39671
2007-06-22 19:05:19 +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