Devang Patel
eac5948348
Use const& for RHS.
...
Use copy for LHS, because it is incremented using ++ operator.
llvm-svn: 42792
2007-10-09 17:10:59 +00:00
Devang Patel
49a44f3b52
Fix comment. Describe what it is, instead of how it is used.
...
llvm-svn: 42791
2007-10-09 17:08:50 +00:00
Fariborz Jahanian
da6c012ee7
Added a new class for Interfaces qualified by protocol list.
...
Protocols are now sorted and made unique in the list.
Enhanced pretty printer for @interface (So, I can see the protocol list).
llvm-svn: 42776
2007-10-08 23:06:41 +00:00
Chris Lattner
ba9dddb01e
Rename FileVariable -> FileVar for consistency with its class name,
...
likewise block and param. Reorder the layout of the Decl kind enum
so that the inheritance tree is reflected in the ordering. This allows
trivial range comparisons to determine whether something is an instance
of some abstract class, making classof faster.
llvm-svn: 42772
2007-10-08 21:37:32 +00:00
Devang Patel
1166312e8b
Code gen case statement ranges.
...
llvm-svn: 42766
2007-10-08 20:57:48 +00:00
Chris Lattner
ef6b136781
move IdentifierTable.h from liblex to libbasic.
...
llvm-svn: 42730
2007-10-07 08:58:51 +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
Devang Patel
8ec4f837fa
Do not codegen dummy block.
...
Dummy block is an empty block with no predecessors.
llvm-svn: 42451
2007-09-28 21:49:18 +00:00
Chris Lattner
2dd003e807
further apfloat'ize the front-end, allowing codegen to pass
...
APFloat straight through to LLVM now.
llvm-svn: 42236
2007-09-22 18:47:25 +00:00
Chris Lattner
793d10ca38
fix some warnings, patch by Justin Handville
...
llvm-svn: 42010
2007-09-16 19:23:47 +00:00
Steve Naroff
a23cc79654
Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl.
...
Decl is now svelte:-)
llvm-svn: 41935
2007-09-13 23:52:58 +00:00
Steve Naroff
9def2b15c1
Phase 2 of making the Decl class more lightweight...
...
Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl.
Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later.
llvm-svn: 41934
2007-09-13 21:41:19 +00:00
Chris Lattner
d3d8aca074
update to match llvm mainline api
...
llvm-svn: 41926
2007-09-13 06:19:18 +00:00
Chris Lattner
6fb276d433
adjust to a change in the LLVM APIs, this is still very hackish until
...
the front-end adopts APFloat though. This fixes test/CodeGen/mandel.c
llvm-svn: 41908
2007-09-13 01:26:11 +00:00
Chris Lattner
69de3f4af6
When dumping out errors about unsupported stuff, emit loc info.
...
llvm-svn: 41907
2007-09-13 01:17:29 +00:00
Hartmut Kaiser
ec7531c9f6
Fixed compilation on Windows.
...
Silenced a couple of warnings.
Added *.vcproj file for new clangAnalysis library.
Renamed Basic to clangBasic projects.
llvm-svn: 41767
2007-09-07 14:34:20 +00:00
Ted Kremenek
c81587d240
Updated calls to CreateGEP to new interface in LLVM mainline.
...
llvm-svn: 41704
2007-09-04 17:20:08 +00:00
Chris Lattner
fb2eb6941a
eliminate some VC++ warnings, patch contributed by Hartmut Kaiser
...
llvm-svn: 41692
2007-09-04 02:34:27 +00:00
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