Commit Graph

1947 Commits

Author SHA1 Message Date
Chris Lattner aa0b570dfb Support fully general case expressions, patch by Sanghyeon Seo!
llvm-svn: 44453
2007-11-30 17:44:57 +00:00
Oliver Hunt 93c4ce650c Fix typo in writable string test
llvm-svn: 44398
2007-11-28 06:52:03 +00:00
Oliver Hunt a951571941 Adding code gen tests for writable and shared string literals.
llvm-svn: 44397
2007-11-28 06:27:12 +00:00
Chris Lattner 2ab40a6207 Fix sema support for the gnu ?: expression with a
missing middle expression, and fix a codegen bug where
we didn't correctly promote the condition to the right 
result type.  This fixes PR1824.

llvm-svn: 44322
2007-11-26 01:40:58 +00:00
Chris Lattner a3ee6fa84f this works.
llvm-svn: 44321
2007-11-26 01:39:17 +00:00
Chris Lattner 136449a6d7 improve codegen for global variable initializers, implementing
test/CodeGen/global-with-initialiser.c

Patch by Oliver Hunt!

llvm-svn: 44290
2007-11-23 22:07:55 +00:00
Anders Carlsson 9c1011c090 Put back the flags field in the constant CF string type.
llvm-svn: 44222
2007-11-19 00:25:30 +00:00
Anders Carlsson bfd60eedd7 Generate code for member exprs.
llvm-svn: 43641
2007-11-02 16:59:10 +00:00
Devang Patel ad175428c6 start adding pading fields.
llvm-svn: 43590
2007-11-01 00:07:12 +00:00
Anders Carlsson e89b84ab29 Fix a typo that prevented pointer-to-int conversions from working.
llvm-svn: 43588
2007-10-31 23:18:02 +00:00
Anders Carlsson 0370eb2034 Handle function calls that return aggregate expressions.
llvm-svn: 43581
2007-10-31 22:04:46 +00:00
Devang Patel cc4c2930ae New test to verify llvm struct layout.
llvm-svn: 43577
2007-10-31 21:02:10 +00:00
Chris Lattner 595db86c9d __real__ and __imag__ can be lvalues. Add support to ast and codegen for them.
llvm-svn: 43525
2007-10-30 22:53:42 +00:00
Devang Patel ed93c3c3b3 Codegen union member references.
llvm-svn: 43390
2007-10-26 19:42:18 +00:00
Devang Patel 7718d7a2eb Handle non LValue base expressions.
llvm-svn: 43387
2007-10-26 18:15:21 +00:00
Devang Patel ffdb07c939 Code gen static initializer.
llvm-svn: 43386
2007-10-26 17:50:58 +00:00
Devang Patel 8717417b3b Codegen array initializers.
llvm-svn: 43385
2007-10-26 17:44:44 +00:00
Devang Patel 19c2b9a66f Codegen global array initializers.
llvm-svn: 43383
2007-10-26 16:31:40 +00:00
Devang Patel b989c9e65c Fix "strbuf += stufflen;" crash.
llvm-svn: 43365
2007-10-25 22:19:13 +00:00
Devang Patel d68df20620 Handle
foo()->a = 42;

llvm-svn: 43315
2007-10-24 22:26:28 +00:00
Devang Patel b67e596d86 Handle non-constant initializers.
llvm-svn: 43301
2007-10-24 18:05:48 +00:00
Devang Patel 61eaea88f8 Fix typo.
llvm-svn: 43269
2007-10-23 23:29:51 +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 30efa2eec9 Handle simple struct member expr.
llvm-svn: 43258
2007-10-23 20:28:39 +00:00
Devang Patel 152f18f671 Recognize while(1) and avoid extra blocks.
llvm-svn: 42811
2007-10-09 20:51:27 +00:00
Devang Patel f8a76755df new test
llvm-svn: 42810
2007-10-09 20:37:41 +00:00
Devang Patel 1166312e8b Code gen case statement ranges.
llvm-svn: 42766
2007-10-08 20:57:48 +00:00
Devang Patel 64a9ca7c58 Support case statement ranges.
llvm-svn: 42648
2007-10-05 20:54:07 +00:00
Devang Patel da5d6bbc40 switch statement code gen.
llvm-svn: 42616
2007-10-04 23:45:31 +00:00
Chris Lattner 8a241f9359 Teach Type::is[un]SignedIntegerType about enum decls. This allows the code generator
to emit signed comparisons when needed for enum decl references.  This implements
test/CodeGen/enum.c.  I think enums should be good now.

llvm-svn: 41572
2007-08-29 17:48:46 +00:00
Chris Lattner 23bf38b8c5 add some more testcases now that sema is happier :)
llvm-svn: 41492
2007-08-27 16:37:44 +00:00
Chris Lattner 61f6077814 testcase that doesn't work quite yet
llvm-svn: 41478
2007-08-27 05:23:45 +00:00
Chris Lattner 02aac86549 new testcases
llvm-svn: 41465
2007-08-26 22:41:57 +00:00
Chris Lattner 1bc6fac5c6 new testcase
llvm-svn: 41406
2007-08-25 21:57:08 +00:00
Chris Lattner 9f0ad96b3e implement codegen for real/imag. TODO: imag of non-complex.
llvm-svn: 41376
2007-08-24 21:20:17 +00:00
Chris Lattner 3d966d6556 Teach emit-llvm for scalars to properly handle compound assignment
operators in all their glory :)

llvm-svn: 41373
2007-08-24 21:00:35 +00:00
Chris Lattner afd455c0cf make this harder
llvm-svn: 41346
2007-08-23 23:49:47 +00:00
Chris Lattner 725c6a4279 this test is passing, though it is generating bogus code at the moment.
llvm-svn: 41314
2007-08-23 05:47:53 +00:00
Chris Lattner 76ba849ed3 Fix array->pointer decay. This unbreaks test/CodeGen/array.c
llvm-svn: 41202
2007-08-20 22:37:10 +00:00
Chris Lattner afada9b077 xfail this for now.
llvm-svn: 41015
2007-08-11 00:05:07 +00:00
Chris Lattner e9a91ae4ea make this harder
llvm-svn: 40994
2007-08-10 17:02:59 +00:00
Chris Lattner b20b94de3a testcase for vector element access stuff.
llvm-svn: 40783
2007-08-03 16:42:43 +00:00
Gabor Greif e97cd7e65c add FIXME and un-XFAIL test
llvm-svn: 39858
2007-07-14 20:05:18 +00:00
Gabor Greif 03a0073b36 fix type of main, use !=
llvm-svn: 39842
2007-07-13 23:40:27 +00:00
Gabor Greif d4606aa36e implement _Complex * == and !=
llvm-svn: 39841
2007-07-13 23:33:18 +00:00
Gabor Greif f7b1f667d4 a simple _Complex testcase
llvm-svn: 39836
2007-07-13 22:15:44 +00:00
Chris Lattner 91dacfec85 Check in these testcases.
llvm-svn: 39829
2007-07-13 20:18:44 +00:00