Chris Lattner
49e3bfa8a4
add stmtexpr support for aggregates
...
llvm-svn: 41662
2007-08-31 22:54:14 +00:00
Chris Lattner
1c3ad19714
add support for complex stmtexpr's
...
llvm-svn: 41661
2007-08-31 22:51:38 +00:00
Chris Lattner
4647a21825
Generalize RValue to handle complex better, generalize EmitCompoundStmt to
...
support any sort of expr, add a new EmitAnyExpr routine.
llvm-svn: 41660
2007-08-31 22:49:20 +00:00
Chris Lattner
04a913b958
implement code generation for scalar stmt expressions.
...
llvm-svn: 41656
2007-08-31 22:09:40 +00:00
Chris Lattner
9e47ead594
Implement codegen support for lowering "library builtins" like __builtin_isinf
...
to their corresponding library routines (e.g. isinf). This allows us to handle
all the stuff in macos math.h, and other stuff as it's added to *Builtins.def.
llvm-svn: 41634
2007-08-31 04:44:06 +00:00
Chris Lattner
1eec6601d9
add the ability to get the llvm function corresponding to a library builtin.
...
llvm-svn: 41633
2007-08-31 04:31:45 +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
fb38f274ff
remove some ugly code now that implicit defs are being generated in this case, thanks Steve!
...
llvm-svn: 41560
2007-08-29 06:38:44 +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
bda69f80bc
move EmitAggregateCopy into AggExprEmitter
...
llvm-svn: 41472
2007-08-26 23:13:56 +00:00
Chris Lattner
c1045b1a69
remove dead code
...
llvm-svn: 41470
2007-08-26 23:02:57 +00:00
Chris Lattner
1916b88723
remove dead protos
...
llvm-svn: 41469
2007-08-26 23:01:23 +00:00
Chris Lattner
6c555f96e8
eliminate EmitAnyExpr, inlining it and simplifying it into its only caller.
...
llvm-svn: 41468
2007-08-26 22:58:05 +00:00
Chris Lattner
a811da5fcd
eliminate use of EmitAnyExpr.
...
llvm-svn: 41467
2007-08-26 22:55:13 +00:00
Chris Lattner
a8d8b71680
implement a fixme
...
llvm-svn: 41466
2007-08-26 22:47:40 +00:00
Chris Lattner
e56d3e1a23
Implement compound assignment operators whose LHS is scalar but RHS is complex.
...
llvm-svn: 41464
2007-08-26 22:37:40 +00:00
Chris Lattner
624e6d0c68
implement codegen of compound assignment operators for complex.
...
llvm-svn: 41463
2007-08-26 22:09:01 +00:00
Chris Lattner
b633469e02
compound assignment operators are of type CompoundAssignOperator
...
llvm-svn: 41460
2007-08-26 21:41:21 +00:00
Chris Lattner
2c666fa40d
update fixme's
...
llvm-svn: 41458
2007-08-26 21:27:07 +00:00
Chris Lattner
6f672c150c
implement complex division
...
llvm-svn: 41457
2007-08-26 21:24:19 +00:00
Chris Lattner
2e928885b2
fix a typo noticed by Gordon Henriksen
...
llvm-svn: 41451
2007-08-26 17:25:57 +00:00
Chris Lattner
c3b3707536
llvmgcc is right :)
...
llvm-svn: 41450
2007-08-26 16:54:05 +00:00
Chris Lattner
183c231cf9
compound assignmetns work for scalars.
...
llvm-svn: 41449
2007-08-26 16:52:57 +00:00
Chris Lattner
c141c1b390
implement conversions of complex to bool.
...
llvm-svn: 41448
2007-08-26 16:52:28 +00:00
Chris Lattner
268fcce4f0
remove ConvertScalarValueToBool.
...
llvm-svn: 41447
2007-08-26 16:46:58 +00:00
Chris Lattner
e004438f4a
reimplement ConvertScalarValueToBool in CGExprScalar.cpp
...
llvm-svn: 41446
2007-08-26 16:42:57 +00:00
Chris Lattner
42e6b8150a
refactor some code to expose compex->scalar conversion to CGF
...
llvm-svn: 41445
2007-08-26 16:34:22 +00:00
Chris Lattner
b84bb95b44
be slightly more volatile correct
...
llvm-svn: 41444
2007-08-26 16:22:13 +00:00
Chris Lattner
f6dcc9df7e
these fixme's are easy :)
...
llvm-svn: 41442
2007-08-26 07:30:49 +00:00
Chris Lattner
b753f66339
implement a fixme, add a couple more :)
...
llvm-svn: 41441
2007-08-26 07:29:23 +00:00
Chris Lattner
5de3b174c8
there are no conversions from aggregates to scalars.
...
llvm-svn: 41440
2007-08-26 07:26:12 +00:00
Chris Lattner
08c611e4dc
implement conversions from complex to scalar types.
...
llvm-svn: 41439
2007-08-26 07:21:11 +00:00
Chris Lattner
46c7161311
Omit EmitConversion
...
llvm-svn: 41438
2007-08-26 07:16:41 +00:00
Chris Lattner
45067906ad
Fix return of aggregate and return of complex.
...
llvm-svn: 41437
2007-08-26 07:14:44 +00:00
Chris Lattner
44d3e74e22
these implicit conversions are now explicit :)
...
llvm-svn: 41436
2007-08-26 07:09:42 +00:00
Chris Lattner
cf3da8495a
remove uses of EmitConversion
...
llvm-svn: 41435
2007-08-26 07:08:39 +00:00
Chris Lattner
798da7033f
implicit casts take care of this code, remove it now.
...
llvm-svn: 41434
2007-08-26 07:06:24 +00:00
Chris Lattner
3474c202ab
refactor scalar conversions out into CGExprScalar.cpp
...
llvm-svn: 41433
2007-08-26 06:48:56 +00:00
Chris Lattner
7460f9620c
Implement casts from scalar -> complex and complex->complex.
...
llvm-svn: 41429
2007-08-26 05:57:57 +00:00
Chris Lattner
b5e1262437
implement codegen of __imag of a scalar. Our impl doesn't suffer from
...
GCC bug PR33192.
llvm-svn: 41427
2007-08-26 05:29:21 +00:00
Chris Lattner
9de9527ad6
Make initialization of complex vars work.
...
llvm-svn: 41426
2007-08-26 05:13:54 +00:00
Chris Lattner
a01d898ff5
fix codegen of pre/post inc/dec of a pointer.
...
llvm-svn: 41425
2007-08-26 05:10:16 +00:00
Chris Lattner
c7f06ca780
tolerate unimplemented codegen better
...
llvm-svn: 41424
2007-08-26 05:06:40 +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
Chris Lattner
881440f5d2
Don't make unknown builtins fatal errors yet.
...
llvm-svn: 41419
2007-08-26 04:17:05 +00:00
Chris Lattner
c5221650b3
remove a bunch of dead code
...
llvm-svn: 41418
2007-08-26 04:13:58 +00:00
Chris Lattner
0fffcb5b28
implement codegen for complex literals.
...
llvm-svn: 41414
2007-08-26 03:51:12 +00:00
Chris Lattner
27f00282e9
The new correct compound assignment operators exposed a bug in codegen.
...
llvm-svn: 41405
2007-08-25 21:56:20 +00:00