Anders Carlsson
12f5a25f15
Handle derived-to-base conversion in CGExprScalar::EmitCast, if the cast kind is CK_DerivedToBase.
...
llvm-svn: 81610
2009-09-12 04:57:16 +00:00
Anders Carlsson
9a57c5ac6f
Whoops, add CGCXXClass.cpp
...
llvm-svn: 81607
2009-09-12 04:27:24 +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
307408d2af
Add CGCXXClass.cpp. and move CodeGenFunction::AddressCXXOfBaseClass there.
...
llvm-svn: 81604
2009-09-12 03:29:09 +00:00
Anders Carlsson
f8e94f2008
Add support for __block variables with alignment greater than __alignof(void *).
...
llvm-svn: 81602
2009-09-12 02:44:18 +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
Daniel Dunbar
020daa9476
Stub out room for ARM APCS ABI implementation (and AAPCS_VFP, although you can't
...
hit this via command line options yet).
llvm-svn: 81595
2009-09-12 01:00:39 +00:00
Daniel Dunbar
d59655c992
Formatting fixes.
...
llvm-svn: 81594
2009-09-12 00:59:49 +00:00
Daniel Dunbar
0ef3479cb7
Change CodeGenModule::ConstructTypeAttributes to return the calling convention
...
to use, and allow the ABI implementation to override the calling convention.
llvm-svn: 81593
2009-09-12 00:59:20 +00:00
Douglas Gregor
15fc956ca0
Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID
...
llvm-svn: 81590
2009-09-12 00:22:50 +00:00
Douglas Gregor
16618f2157
Remove unnecessary ASTContext parameters from isMain and isExternC
...
llvm-svn: 81589
2009-09-12 00:17:51 +00:00
Anders Carlsson
97c7eda14a
Fix a crash when generating vtables that contain destructors.
...
llvm-svn: 81587
2009-09-12 00:00:29 +00:00
Mike Stump
80f6ac5a4f
Add basic covariant thunk generation support. WIP.
...
llvm-svn: 81585
2009-09-11 23:25:56 +00:00
Daniel Dunbar
bbaeca4fef
Set the calling convention based on the CGFunctionInfo.
...
llvm-svn: 81582
2009-09-11 22:25:00 +00:00
Daniel Dunbar
7feafc70d9
Add CallingConvention argument to CGFunctionInfo.
...
- Currently unused.
llvm-svn: 81581
2009-09-11 22:24:53 +00:00
Daniel Dunbar
c0f8eef710
Fix use of uninitialized, David please check.
...
llvm-svn: 81570
2009-09-11 20:56:53 +00:00
Fariborz Jahanian
10e9bffde3
Fixes a regression in objc GC layout bitmap involving
...
block pointer ivars.
llvm-svn: 81535
2009-09-11 17:39:05 +00:00
Daniel Dunbar
33a004e9eb
Swizzle the target triple based on -mthumb, and update clang-cc to recognize
...
thumb-foo-bar as an ARM target.
llvm-svn: 81497
2009-09-11 01:14:50 +00:00
Anders Carlsson
fd384d8065
Pass the GlobalDecl to getMangledName, fixes PR4890.
...
llvm-svn: 81486
2009-09-11 00:11:35 +00:00
Anders Carlsson
73fcc95f0f
Pass GlobalDecls to GenerateCode and StartFunction.
...
llvm-svn: 81485
2009-09-11 00:07:24 +00:00
Anders Carlsson
ecf9bf0158
GlobalDecl doesn't have an explicit constructor anymore.
...
llvm-svn: 81481
2009-09-10 23:43:36 +00:00
Anders Carlsson
38988d7ee0
Add stricter GlobalDecl constructors.
...
llvm-svn: 81480
2009-09-10 23:38:47 +00:00
Fariborz Jahanian
2cde203392
Non fragile ABI for GNU runtime. Patch bu David Chisnall.
...
llvm-svn: 81462
2009-09-10 21:48:21 +00:00
Fariborz Jahanian
d1f1ff3978
Get the size of object to pass to objc_memmove_collectable()
...
from correct field of TypeInfo.
llvm-svn: 81446
2009-09-10 16:20:31 +00:00
Anders Carlsson
10f2c10b83
Make the forwarding member of block byref structs be a pointer to the block byref struct itself.
...
llvm-svn: 81423
2009-09-10 01:32:12 +00:00
Anders Carlsson
1ca52689e7
Use the right GlobalDecl type for destructors.
...
llvm-svn: 81398
2009-09-09 23:17:18 +00:00
Daniel Dunbar
277aa36d68
Suppress build warning.
...
llvm-svn: 81384
2009-09-09 22:32:15 +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
Mike Stump
4a3999fe90
Reflow comments and some minor whitespace fixups.
...
llvm-svn: 81337
2009-09-09 13:00:44 +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
Anders Carlsson
2fb0824197
Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!
...
llvm-svn: 81237
2009-09-08 18:24:21 +00:00
Benjamin Kramer
b178ab2155
Remove unnecessary #include <sstream>.
...
llvm-svn: 81147
2009-09-07 11:12:05 +00:00
Mike Stump
e73d5ca9a8
Refine vcall offsets. Cleanups. WIP.
...
llvm-svn: 81143
2009-09-07 04:27:52 +00:00
Daniel Dunbar
d027a92431
Use a SetVector for tracking some Obj-C metadata, to ensure deterministic
...
output.
- Also, cleanup code to output inline asm references.
llvm-svn: 81139
2009-09-07 00:20:42 +00:00
Mike Stump
b82db12b35
Refine overrides and thunks for virtual bases. Cleanups. WIP.
...
llvm-svn: 81080
2009-09-05 11:28:33 +00:00
Mike Stump
c9eb1727db
Cleanup.
...
llvm-svn: 81078
2009-09-05 09:24:43 +00:00
Mike Stump
69bbd6ce84
Cleanups.
...
llvm-svn: 81077
2009-09-05 09:10:58 +00:00
Mike Stump
6363021ab9
Cleanups.
...
llvm-svn: 81075
2009-09-05 08:47:24 +00:00
Mike Stump
3cdb051425
Cleanups.
...
llvm-svn: 81074
2009-09-05 08:45:02 +00:00
Mike Stump
5e3ac0249c
Cleanups.
...
llvm-svn: 81073
2009-09-05 08:40:18 +00:00
Mike Stump
ea8eea2c45
Cleanups.
...
llvm-svn: 81072
2009-09-05 08:37:03 +00:00
Mike Stump
db14a73606
Cleanups.
...
llvm-svn: 81071
2009-09-05 08:07:32 +00:00
John McCall
cc5e23ca8d
Overhaul the mangler to use a visitor pattern, at least for types. We can safely
...
ignore non-canonical type classes, but apparently we need to know how to mangle
dependent names.
The missing cases are much more obvious now.
llvm-svn: 81070
2009-09-05 07:56:18 +00:00
Mike Stump
001ad31c9a
Cleanups. WIP.
...
llvm-svn: 81069
2009-09-05 07:49:12 +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
John McCall
b2e195a585
Start emitting ElaboratedTypes in C++ mode. Support the effort in various
...
ways: remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.
llvm-svn: 81065
2009-09-05 06:31:47 +00:00
John McCall
fcc33b074b
Basic support for representing elaborated type specifiers
...
directly in the AST. The current thinking is to create these
only in C++ mode for efficiency. But for now, they're not being
created at all; patch to follow.
This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.
Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.
llvm-svn: 81057
2009-09-05 00:15:47 +00:00
Douglas Gregor
34ec2ef159
Improve the AST representation and semantic analysis for extern
...
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.
llvm-svn: 81053
2009-09-04 22:48:11 +00:00
Douglas Gregor
d94105a1c2
Don't generate any code for an explicit call to a trivial destructor.
...
Now that parsing, semantic analysis, and (I think) code generation of
pseudo-destructor expressions and explicit destructor calls works,
update the example-dynarray.cpp test to destroy the objects it
allocates and update the test to actually compile + link.
The code seems correct, but the Clang-compiled version dies with a
malloc error. Time to debug!
llvm-svn: 81025
2009-09-04 19:04:08 +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
Douglas Gregor
ad8a336b40
Implement AST, semantics, and CodeGen for C++ pseudo-destructor
...
expressions, e.g.,
p->~T()
when p is a pointer to a scalar type.
We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.
llvm-svn: 81009
2009-09-04 17:36:40 +00:00
Anders Carlsson
0e91275ab4
If the alignment of the chosen field in a union is greater than the alignment of the union, we need to use a packed LLVM struct. Fixes <rdar://problem/7184250>.
...
llvm-svn: 80964
2009-09-03 22:56:02 +00:00
David Chisnall
2c5bef2a74
Fixed bug introduced in r79900 where FreeBSD was turned into NetBSD, transposing the ABIs and breaking both platforms.
...
llvm-svn: 80870
2009-09-03 01:48:05 +00:00
Douglas Gregor
e5feb51624
Don't try to CodeGen using directives, from Anders Johnsen
...
llvm-svn: 80853
2009-09-02 23:49:23 +00:00
Anders Carlsson
35dca26835
Fix an assertion when initializing a union using a member initializer. (We weren't casting from the union type to the initializer type correctly).
...
llvm-svn: 80837
2009-09-02 21:14:47 +00:00
Anders Carlsson
09a3774cd3
Packed unions should be packed. Fixes an assert Daniel reported.
...
llvm-svn: 80808
2009-09-02 17:51:33 +00:00
Mike Stump
3f707e9f14
Add mangling for covariant thunks.
...
llvm-svn: 80747
2009-09-02 00:56:18 +00:00
Mike Stump
a119813218
Shorten name.
...
llvm-svn: 80744
2009-09-02 00:28:47 +00:00
Mike Stump
9cc7d30435
Add mangling for thunks.
...
llvm-svn: 80743
2009-09-02 00:25:38 +00:00
Mike Stump
2348e62498
More overriding base work and some cleanups. WIP.
...
llvm-svn: 80737
2009-09-01 23:22:44 +00:00
Mike Stump
40dc64bcfc
Split out overriding. WIP.
...
llvm-svn: 80732
2009-09-01 22:20:28 +00:00
Anders Carlsson
c82555fb85
Handle member expressions that return references correctly.
...
llvm-svn: 80723
2009-09-01 21:18:52 +00:00
Anders Carlsson
783ab50b33
Assert that we don't have any virtual bases. We can emit dtors for polymorphics classes just fune.
...
llvm-svn: 80722
2009-09-01 21:12:16 +00:00
Anders Carlsson
f1ae6d45dd
Use the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827.
...
llvm-svn: 80720
2009-09-01 20:52:42 +00:00
Anders Carlsson
6b8b4b459d
We can generate constructors/destructors with base classes and non-trivial fields just fine now.
...
llvm-svn: 80701
2009-09-01 18:33:46 +00:00
Fariborz Jahanian
1a50477385
Fixed a property getter ir-gen crash.
...
llvm-svn: 80681
2009-09-01 17:02:21 +00:00
Eli Friedman
1c277d0fe8
PR4836, part 2: CodeGen for __builtin_isnan.
...
llvm-svn: 80655
2009-09-01 04:19:44 +00:00
Douglas Gregor
f405d7e6f1
Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
...
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.
llvm-svn: 80642
2009-08-31 23:41:50 +00:00
Devang Patel
124095bb18
Rename DIBlock as DILexicalBlock.
...
llvm-svn: 80634
2009-08-31 22:00:32 +00:00
Douglas Gregor
96ee789d33
Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will
...
also be adding explicit template arguments as an additional
"adornment". No functionality change.
llvm-svn: 80628
2009-08-31 21:41:48 +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
David Chisnall
5778fce141
Updated GNU runtime non-fragile ABI.
...
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.
llvm-svn: 80591
2009-08-31 16:41:57 +00:00
Eli Friedman
033e8d4ae6
Make IRGen for initializing a member reference work correctly.
...
llvm-svn: 80439
2009-08-29 20:58:20 +00:00
Fariborz Jahanian
0a484d007b
Patch to ir-gen user-defined conversions used in expressions
...
[12.3.2-p3]
llvm-svn: 80436
2009-08-29 20:33:32 +00:00
Fariborz Jahanian
3df8767869
Patch for code gen. for c-style cast which ends in
...
using class's conversion functions [12.3.2-p2]
llvm-svn: 80433
2009-08-29 19:15:16 +00:00
Mike Stump
beefdc8948
iGenerate vcalls as we build up the methods. WIP.
...
llvm-svn: 80405
2009-08-28 23:22:54 +00:00
Fariborz Jahanian
8b899e4247
ir-gen related patch for type conversion
...
with class type conversion methods. WIP.
llvm-svn: 80365
2009-08-28 15:11:24 +00:00
Eli Friedman
ff083ef429
Clean up CodeGenFunction::EmitCastLValue to use the cast kind. Error
...
out for user-defined conversions instead of crashing.
llvm-svn: 80282
2009-08-27 21:19:33 +00:00
Mike Stump
a0d0e6fcb1
Fixup codegen for static dispatch to a virtual function that was
...
almost correct. :-)
llvm-svn: 80181
2009-08-26 23:38:08 +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
Douglas Gregor
c190523d7a
When a member reference expression includes a qualifier on the member
...
name, e.g.,
x->Base::f()
retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.
When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?
llvm-svn: 80167
2009-08-26 22:36:53 +00:00
Mike Stump
3722f5896c
Regularize the case and sort.
...
llvm-svn: 80163
2009-08-26 22:31:08 +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
Eli Friedman
95f896380f
Make address-space qualification work correctly for compound literals.
...
Issue reported on cfe-dev.
Also fixed the code to use isConstant to determine whether to generate a
constant global, to be consistent with CodeGenModule. This probably
needs to be refactored to deal with C++, though.
llvm-svn: 80131
2009-08-26 20:01:39 +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
Fariborz Jahanian
2c73b1d2a2
Simplified default construction of array data members
...
in the constructor prologue.
llvm-svn: 80060
2009-08-26 00:23:27 +00:00
Anders Carlsson
6c0a6e490c
Emit conversion functions correctly.
...
llvm-svn: 79985
2009-08-25 13:14:46 +00:00
Anders Carlsson
12e022ddbf
Fix ivar layout map generation (hopefully).
...
llvm-svn: 79968
2009-08-25 02:07:02 +00:00
Fariborz Jahanian
a6a3494c1d
Remove #ifdef'out code.
...
llvm-svn: 79956
2009-08-24 23:16:37 +00:00
Fariborz Jahanian
7c07d5fed8
Remove ivarlayout bitmap optimization, instead if all zeros,
...
put out the bitmap when all objects are scanned.
llvm-svn: 79947
2009-08-24 21:55:06 +00:00
Anders Carlsson
c327709db8
Handle array to pointer decay in EmitCastExpr and get rid of VisitImplicitCastExpr.
...
llvm-svn: 79930
2009-08-24 18:37:17 +00:00
Anders Carlsson
3df53bcf10
Handle CK_NullToMemberPointer in ScalarExprEmitter::EmitCast
...
llvm-svn: 79929
2009-08-24 18:26:39 +00:00
Anders Carlsson
15583e4493
Pass the cast kind to ScalarExprEmitter::EmitCastExpr.
...
llvm-svn: 79928
2009-08-24 18:12:39 +00:00
Anders Carlsson
867b48f713
More member pointer work.
...
llvm-svn: 79922
2009-08-24 17:16:23 +00:00
Anders Carlsson
4557b2c0c2
Remove dead code
...
llvm-svn: 79921
2009-08-24 16:52:33 +00:00
Torok Edwin
db7149246f
Fix build of clang with gcc-4.4: #include <cstdio> was missing.
...
llvm-svn: 79916
2009-08-24 13:25:12 +00:00
Daniel Dunbar
576d90d39b
Remove TargetInfo::getTargetPrefix().
...
llvm-svn: 79907
2009-08-24 09:54:37 +00:00
Daniel Dunbar
40165180f7
Switch TargetInfo to store an llvm::Triple.
...
- Primarily to discourage clients form making decisions based on the string.
llvm-svn: 79901
2009-08-24 09:10:05 +00:00
Daniel Dunbar
e3532f82a7
Switch ABI selection to use llvm::Triple instead of string munging.
...
llvm-svn: 79900
2009-08-24 08:52:16 +00:00
Douglas Gregor
76d8c5725f
Don't install Clang libraries.
...
llvm-svn: 79824
2009-08-23 05:02:18 +00:00
Anders Carlsson
622ddae92b
Whoops, comment this out for now. I'll fix it shortly.
...
llvm-svn: 79806
2009-08-23 01:28:08 +00:00
Anders Carlsson
d606de72ab
More work towards zero-initializing structs that contain member pointers in constant expressions.
...
llvm-svn: 79805
2009-08-23 01:25:01 +00:00
Anders Carlsson
beac2bef4d
Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.
...
llvm-svn: 79799
2009-08-23 01:01:04 +00:00
Anders Carlsson
faeccc622f
Handle CK_NullToMemberPointer casts in the constant expr emitter.
...
llvm-svn: 79790
2009-08-23 00:02:11 +00:00
Anders Carlsson
3b0c5dcdd2
Change the constant expression emitter to look at the cast kind for to-union casts.
...
llvm-svn: 79789
2009-08-22 23:54:44 +00:00
Anders Carlsson
9cedbefb24
Add a -fno-elide-constructors option to clang-cc.
...
llvm-svn: 79782
2009-08-22 22:30:33 +00:00
Mike Stump
0b8c5ae7af
Calculate the address point for a vtable better, and start fleshing out the vcall
...
calculations better.
llvm-svn: 79687
2009-08-21 23:09:30 +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
7481bd88bb
Array member construction in prologue of user-declared
...
constructors.
llvm-svn: 79640
2009-08-21 17:09:38 +00:00
Fariborz Jahanian
6c9e5a2b9e
Introduce getConstantArrayElementCount API and use it in
...
construction/destruction of array members.
llvm-svn: 79637
2009-08-21 16:31:06 +00:00
Mike Stump
a002945a20
We now support overriding base functions in vtables. WIP.
...
llvm-svn: 79587
2009-08-21 01:45:00 +00:00
Argyrios Kyrtzidis
6032ef1aa3
Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information.
...
llvm-svn: 79584
2009-08-21 00:31:54 +00:00
Fariborz Jahanian
1a606ab12a
Patch to ir-gen destruction of array member elements in revers order
...
of their construction.
llvm-svn: 79571
2009-08-20 23:02:58 +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
Mike Stump
cae6178b3b
Refine vbase offsets for the inductive case. Things are now starting
...
to come together nicely. Still a WIP.
llvm-svn: 79521
2009-08-20 07:22:17 +00:00
Mike Stump
2220447adc
Ensure we don't output repeated vbase offsets. I have a testcase for
...
this, but need to fixup the actual offset value before I can check it
in. WIP.
llvm-svn: 79506
2009-08-20 02:11:48 +00:00
Fariborz Jahanian
dd46eb770f
Test case for my last patch plus a minor clean up.
...
llvm-svn: 79500
2009-08-20 01:01:06 +00:00
Fariborz Jahanian
eeb0e57247
ir-gen for multi-dimensional array construction. WIP.
...
llvm-svn: 79497
2009-08-20 00:15:15 +00:00
Fariborz Jahanian
a8fe2c26a8
Removed unneeded code for break/continue statements in
...
manufactured for-loop per Anders feedback (thanks).
- Fariborz
llvm-svn: 79466
2009-08-19 21:10:38 +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
Daniel Dunbar
58bc48c14e
Switch to SmallString::str from SmallString::c_str.
...
- Several FIXMEs due to non-Twinification of IRBuilder.
llvm-svn: 79455
2009-08-19 20:04:03 +00:00
Mike Stump
3bc0a3bf7d
One second thought, I think I want to limit this class to just vtable
...
building activities.
llvm-svn: 79438
2009-08-19 18:10:47 +00:00
Mike Stump
b386941208
Cleanup: fold IndirectPrimary into builder.
...
llvm-svn: 79423
2009-08-19 14:40:47 +00:00
Mike Stump
3b09f004db
We don't want to confuse this layout with the BLayout from the builder.
...
llvm-svn: 79422
2009-08-19 14:06:50 +00:00
Mike Stump
984c99d190
Restore vbase offsets for classes without a primary.
...
llvm-svn: 79402
2009-08-19 02:53:08 +00:00
Mike Stump
583ef62149
Refine vcalls a little.
...
llvm-svn: 79400
2009-08-19 02:06:38 +00:00
Argyrios Kyrtzidis
e918926d31
Introduce LocInfoType which is a Sema-specific implementation detail.
...
This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.
llvm-svn: 79394
2009-08-19 01:28:17 +00:00
Argyrios Kyrtzidis
60ed560428
Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.
...
DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.
Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.
llvm-svn: 79392
2009-08-19 01:27:57 +00:00
Mike Stump
6fe6ca11da
Cleanup.
...
llvm-svn: 79374
2009-08-18 22:04:08 +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
Fariborz Jahanian
19380c4b88
Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
...
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.
llvm-svn: 79371
2009-08-18 21:37:33 +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
Mike Stump
1f18b9a301
Suck up method generation.
...
llvm-svn: 79367
2009-08-18 21:03:28 +00:00
Mike Stump
5cb34077ef
Split out vtable bulding code into a builder.
...
llvm-svn: 79366
2009-08-18 20:50:28 +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
David Chisnall
26657ea8bc
Fixed typo in last commit pointed out by Anton.
...
llvm-svn: 79290
2009-08-17 23:18:30 +00:00
David Chisnall
de3a06933d
Changes to TargetABIInfo to (hopefully) select the correct calling convention. This has been tested on FreeBSD, and now correctly generates GCC-compatible code for functions returning small structures. Please test it on other platforms!
...
llvm-svn: 79288
2009-08-17 23:08:21 +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
49033712e4
Remove an ErrorUnsupported call.
...
llvm-svn: 79261
2009-08-17 18:24:57 +00:00
David Chisnall
9f57c29053
Initial patch to support definitions of id and Class from headers in Objective-C code.
...
This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa.
Approved by snaroff.
llvm-svn: 79248
2009-08-17 16:35:33 +00:00
Anders Carlsson
81f0df9601
Improve handling of delete expressions.
...
llvm-svn: 79205
2009-08-16 21:13:42 +00:00
Fariborz Jahanian
d262eda6fc
Patch toward synthesizing non-trivial destructors. WIP
...
llvm-svn: 79199
2009-08-16 19:36:17 +00:00
Anders Carlsson
3b848940d7
Only do this for initializers of course.
...
llvm-svn: 79197
2009-08-16 17:54:29 +00:00
Anders Carlsson
b80760bd78
Destroy bound temporaries.
...
llvm-svn: 79196
2009-08-16 17:50:25 +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