Граф коммитов

49 Коммитов

Автор SHA1 Сообщение Дата
Chris Lattner 3e47be5c90 fix a bug handling typedefs in member expr codegen. Patch
by Seo Sanghyeon


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44455 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30 18:02:19 +00:00
Chris Lattner 2202bce80f Fix a codegen crash on void ?: reported by Oliver
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44454 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30 17:56:23 +00:00
Chris Lattner c69a5810f4 Support fully general case expressions, patch by Sanghyeon Seo!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44453 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30 17:44:57 +00:00
Oliver Hunt 0d3b50ec86 Fix typo in writable string test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44398 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-28 06:52:03 +00:00
Oliver Hunt 01acb91aff Adding code gen tests for writable and shared string literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44397 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-28 06:27:12 +00:00
Chris Lattner a21ddb30e5 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44322 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-26 01:40:58 +00:00
Chris Lattner 09376fd7f7 this works.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44321 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-26 01:39:17 +00:00
Chris Lattner 75cf28834e improve codegen for global variable initializers, implementing
test/CodeGen/global-with-initialiser.c

Patch by Oliver Hunt!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44290 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-23 22:07:55 +00:00
Anders Carlsson f06273f8bb Put back the flags field in the constant CF string type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44222 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-19 00:25:30 +00:00
Anders Carlsson a1ff3e9290 Generate code for member exprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43641 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 16:59:10 +00:00
Devang Patel f9fef92564 start adding pading fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43590 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01 00:07:12 +00:00
Anders Carlsson 50b5a30db4 Fix a typo that prevented pointer-to-int conversions from working.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43588 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 23:18:02 +00:00
Anders Carlsson 148fe67727 Handle function calls that return aggregate expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43581 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 22:04:46 +00:00
Devang Patel 9544ff2d96 New test to verify llvm struct layout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43577 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 21:02:10 +00:00
Chris Lattner 7da36f642e __real__ and __imag__ can be lvalues. Add support to ast and codegen for them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43525 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 22:53:42 +00:00
Devang Patel abad06cfd0 Codegen union member references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43390 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 19:42:18 +00:00
Devang Patel 0a96118bb8 Handle non LValue base expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43387 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 18:15:21 +00:00
Devang Patel e40daa4e84 Code gen static initializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43386 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 17:50:58 +00:00
Devang Patel 636c3d0467 Codegen array initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43385 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 17:44:44 +00:00
Devang Patel 8e53e720b3 Codegen global array initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43383 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 16:31:40 +00:00
Devang Patel f86206ffbf Fix "strbuf += stufflen;" crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43365 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 22:19:13 +00:00
Devang Patel 126a856ecd Handle
foo()->a = 42;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43315 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 22:26:28 +00:00
Devang Patel a83cc33195 Handle non-constant initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43301 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 18:05:48 +00:00
Devang Patel dbb46b1985 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43269 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-23 23:29:51 +00:00
Devang Patel b1e3989731 Handle nested structs.
typdef struct A { int i; struct A *next; } A


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43268 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-23 23:26:46 +00:00
Devang Patel b9b00ad626 Handle simple struct member expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43258 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-23 20:28:39 +00:00
Devang Patel 2c30d8fee8 Recognize while(1) and avoid extra blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42811 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-09 20:51:27 +00:00
Devang Patel a2c534223d new test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42810 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-09 20:37:41 +00:00
Devang Patel c049e4f406 Code gen case statement ranges.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42766 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-08 20:57:48 +00:00
Devang Patel 2d79d0f3ac Support case statement ranges.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42648 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 20:54:07 +00:00
Devang Patel 51b09f2c52 switch statement code gen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42616 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-04 23:45:31 +00:00
Chris Lattner d5bbce4382 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41572 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-29 17:48:46 +00:00
Chris Lattner 9cff1a9ac2 add some more testcases now that sema is happier :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41492 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 16:37:44 +00:00
Chris Lattner 02b3c26e71 testcase that doesn't work quite yet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41478 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 05:23:45 +00:00
Chris Lattner 8ae3a9f8be new testcases
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41465 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26 22:41:57 +00:00
Chris Lattner 9c62c1d628 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41406 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-25 21:57:08 +00:00
Chris Lattner 46f93d021a implement codegen for real/imag. TODO: imag of non-complex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41376 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-24 21:20:17 +00:00
Chris Lattner 1f1ded9629 Teach emit-llvm for scalars to properly handle compound assignment
operators in all their glory :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41373 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-24 21:00:35 +00:00
Chris Lattner fd90ac054e make this harder
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41346 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-23 23:49:47 +00:00
Chris Lattner 99351fdeaf this test is passing, though it is generating bogus code at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41314 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-23 05:47:53 +00:00
Chris Lattner 7016a706c9 Fix array->pointer decay. This unbreaks test/CodeGen/array.c
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41202 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-20 22:37:10 +00:00
Chris Lattner 954698cd84 xfail this for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41015 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-11 00:05:07 +00:00
Chris Lattner 12b2be25f8 make this harder
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-10 17:02:59 +00:00
Chris Lattner 90997ac90d testcase for vector element access stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40783 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-03 16:42:43 +00:00
Gabor Greif d5e0d9854c add FIXME and un-XFAIL test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-14 20:05:18 +00:00
Gabor Greif b02d4b4bdf fix type of main, use !=
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39842 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 23:40:27 +00:00
Gabor Greif 4db18f279b implement _Complex * == and !=
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39841 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 23:33:18 +00:00
Gabor Greif bacfa02138 a simple _Complex testcase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39836 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 22:15:44 +00:00
Chris Lattner 8da1cb6339 Check in these testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39829 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 20:18:44 +00:00