Anders Carlsson
52d78a518a
CodeGen for try statements. (We just emit the body for now).
...
llvm-svn: 82910
2009-09-27 18:58:34 +00:00
John McCall
8ccfcb51ee
Refactor the representation of qualifiers to bring ExtQualType out of the
...
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
llvm-svn: 82705
2009-09-24 19:53:00 +00:00
Anders Carlsson
d49844b715
Add a new variant of EmitCXXAggrConstructorCall that takes a Value that holds the number of elements to construct, to be used when implementing new[].
...
llvm-svn: 82602
2009-09-23 02:45:36 +00:00
Anders Carlsson
1450adbbf9
Code generation of Conditional operators that are lvalues (but that aren't bitfields).
...
llvm-svn: 81867
2009-09-15 16:35:24 +00:00
Anders Carlsson
ddf57d3df9
Remove an unnecessary FunctionDecl parameter to the synthesizing functions.
...
llvm-svn: 81759
2009-09-14 05:32:02 +00:00
Anders Carlsson
96bad9a5cd
Implement CodeGenFunction::EmitCXXExprWithTemporariesLValue.
...
llvm-svn: 81738
2009-09-14 01:10:45 +00:00
Anders Carlsson
864d525533
Rename AddressCXXOfBaseClass to GetAddressCXXOfBaseClass. Add a NullCheckValue argument (currently unused).
...
llvm-svn: 81606
2009-09-12 04:26:35 +00:00
Anders Carlsson
0168f4b202
For __block variables, cache the LLVM types as well as which LLVM field where the variable is stored.
...
llvm-svn: 81599
2009-09-12 02:14:24 +00:00
Mike Stump
80f6ac5a4f
Add basic covariant thunk generation support. WIP.
...
llvm-svn: 81585
2009-09-11 23:25:56 +00:00
Anders Carlsson
73fcc95f0f
Pass GlobalDecls to GenerateCode and StartFunction.
...
llvm-svn: 81485
2009-09-11 00:07:24 +00:00
Anders Carlsson
e9766d559b
If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.
...
llvm-svn: 81383
2009-09-09 21:33:21 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Anders Carlsson
71d1d92d37
Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.
...
llvm-svn: 81315
2009-09-09 02:51:03 +00:00
Mike Stump
453fe4285d
Install thunks later to fixup overrides. Track space taken by vbase
...
offsets better for thunk refinements. Cleanups. WIP.
llvm-svn: 81067
2009-09-05 07:20:32 +00:00
Mike Stump
5a522353c3
Add overidding for methods for vtable building for the secondary
...
vtables. Add thunk generation. WIP.
llvm-svn: 81014
2009-09-04 18:27:16 +00:00
Fariborz Jahanian
879d726608
Re-implemented generation of objc_memmove_collectable
...
API for copying GC'able aggregates (Next runtime only).
llvm-svn: 80607
2009-08-31 19:33:16 +00:00
Fariborz Jahanian
c71f094c08
ir-gen for type convesion of class objects. WIP.
...
llvm-svn: 80178
2009-08-26 23:31:30 +00:00
Mike Stump
a5588bf3ac
Implement virtual dispatch. :-) This is self-consistent with clang,
...
but not yet necessarily perfectly consistent with gcc. Also addressed
Doug and John's comments.
llvm-svn: 80137
2009-08-26 20:46:33 +00:00
Anders Carlsson
458055a890
Revert r80064 since it broke the build.
...
llvm-svn: 80066
2009-08-26 03:30:14 +00:00
Mike Stump
fbddfdacdc
Implement virtual dispatch. :-) This is self-consistent with clang, but not yet
...
necessarily perfectly consistent with gcc.
llvm-svn: 80064
2009-08-26 01:54:35 +00:00
Anders Carlsson
4557b2c0c2
Remove dead code
...
llvm-svn: 79921
2009-08-24 16:52:33 +00:00
Fariborz Jahanian
8adc973483
Patch to ir-gen copy assigning array members when synthesizing
...
a copy assignment operator function.
llvm-svn: 79681
2009-08-21 22:34:55 +00:00
Fariborz Jahanian
5626384384
Patch to provide ir-gen support in copying array members
...
when synthesizing a copy constructor. Arrays's base element
may have a trivial or non-trivial copy constructor.
llvm-svn: 79653
2009-08-21 18:30:26 +00:00
Fariborz Jahanian
9c83720d17
ir-gen patch to destruct array members. WIP.
...
llvm-svn: 79565
2009-08-20 20:54:15 +00:00
Fariborz Jahanian
9a84665921
Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
...
A field rename and more comments.
llvm-svn: 79537
2009-08-20 17:02:02 +00:00
Fariborz Jahanian
431c883287
ir-gen for constructing arrays as non-static data members. WIP.
...
llvm-svn: 79464
2009-08-19 20:55:16 +00:00
Mike Stump
494c42526b
Add some documentation.
...
llvm-svn: 79373
2009-08-18 21:59:28 +00:00
Mike Stump
07347353a0
Cleanups. Move GenerateRtti to CodeGenModule.
...
llvm-svn: 79372
2009-08-18 21:49:00 +00:00
Mike Stump
ee81dca8c7
Move the rest of the vtable building code into the new builder.
...
llvm-svn: 79370
2009-08-18 21:30:21 +00:00
Fariborz Jahanian
88cc2340de
Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
...
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).
llvm-svn: 79365
2009-08-18 20:50:23 +00:00
Fariborz Jahanian
d172e91f2a
Patch to 1) synthesizing non-trivial default destructor when
...
one is not provided by user. 2) More complete
emission of ctor prologue when it has no initializer
list or when it is synthesized.
llvm-svn: 79269
2009-08-17 19:04:50 +00:00
Anders Carlsson
81f0df9601
Improve handling of delete expressions.
...
llvm-svn: 79205
2009-08-16 21:13:42 +00:00
Anders Carlsson
5b106a7545
Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.
...
llvm-svn: 79179
2009-08-16 07:36:22 +00:00
Mike Stump
22ea1f8a30
Cleanups and fixups for calculating the virtual base offsets. WIP.
...
llvm-svn: 79156
2009-08-16 01:46:26 +00:00
Eli Friedman
04fddf0d1f
Fix for PR4721: adjust CodeGen and ASTContext so that we have a
...
consistent model for handling size expressions for VLAs.
The model is essentially as follows: VLA types own their associated
expression. In some cases, we need to create multiple VLA types to
represent a given VLA (for canonical types, or qualifiers on array types,
or type merging). If we need to create multiple types based off of
the same VLA declaration, we use the new refcounting functionality so they can
all own the expression. The VLASizeMap in CodeGenFunction then uses the size
expression to identify the group of VLA types based off of the same original
declaration.
I'm not particularly attached to the VLA types owning the expression,
but we're stuck with at least until someone comes up with a way
to walk the VLA expressions for a declaration.
I did the parallel fix in ASTContext for DependentSizedArrayType, but I
haven't really looked closely at it, so there might still be issues
there.
I'll clean up the code duplication in ASTContext in a followup commit.
llvm-svn: 79071
2009-08-15 02:50:32 +00:00
Mike Stump
c2f591b1e6
Refine vtable layout for virtual bases and keep better track of
...
primaries. WIP.
llvm-svn: 78950
2009-08-13 22:53:07 +00:00
Owen Anderson
41a750271b
Update for LLVM API change.
...
llvm-svn: 78946
2009-08-13 21:57:51 +00:00
Fariborz Jahanian
bbd5e8c2cf
More toward synthesizing copy assignments. SWIP.
...
llvm-svn: 78861
2009-08-12 23:34:46 +00:00
Mike Stump
938f15b033
Refactor. WIP. Eventually, this will all go into a vtable builder class.
...
llvm-svn: 78857
2009-08-12 23:14:12 +00:00
Mike Stump
82165efbc4
Refactor.
...
llvm-svn: 78854
2009-08-12 23:00:59 +00:00
Fariborz Jahanian
de7d4c264a
Patch for synthesizing copy assignment operator.
...
WIP.
llvm-svn: 78841
2009-08-12 21:14:35 +00:00
Mike Stump
cecfe61cd1
Refine vtable building for the secondary vtables to exclude yet more
...
cases where a virtual base was already used as a primary base class.
WIP.
llvm-svn: 78820
2009-08-12 17:42:21 +00:00
Benjamin Kramer
9cd050ab07
LLVMContext is a class now.
...
llvm-svn: 78691
2009-08-11 17:46:57 +00:00
Fariborz Jahanian
9d3405ceab
minor refactoring. No change otherwise.
...
llvm-svn: 78582
2009-08-10 18:46:38 +00:00
Fariborz Jahanian
24f38969d5
ir-gen for initialization, in synthesize copy constructor,
...
of base/field which have trivial copy constructor.
llvm-svn: 78516
2009-08-08 23:32:22 +00:00
Anders Carlsson
b8be93fc92
Add support for global initializers.
...
llvm-svn: 78515
2009-08-08 23:24:23 +00:00
Anders Carlsson
f40886acca
Refactor some code and implement support for global destructors for static variables.
...
llvm-svn: 78507
2009-08-08 21:45:14 +00:00
Fariborz Jahanian
f6bda5d61e
Refactoring of copy ctor ir-gen. No change in functionality.
...
llvm-svn: 78489
2009-08-08 19:31:03 +00:00
Fariborz Jahanian
b68df0bc42
Synthesized copy constructor now generates code for
...
copying non-virtual base classes which have non-trivial
constructor. Work in progress.
llvm-svn: 78436
2009-08-07 23:51:33 +00:00
Fariborz Jahanian
40134e71be
More synthesis of copy constructors. Work in progress.
...
llvm-svn: 78402
2009-08-07 20:22:40 +00:00