Anders Carlsson
5b0057c05b
Fix a bug with base offset merging that Devang noticed.
...
llvm-svn: 97641
2010-03-03 04:58:02 +00:00
Anders Carlsson
7162ab947b
Handle unused functions in construction vtables correctly.
...
llvm-svn: 97406
2010-02-28 18:37:33 +00:00
Anders Carlsson
8b37bb7c48
When laying out vtables for virtual bases in construction vtables, we need to check if the vtable is a primary base in the layout class.
...
llvm-svn: 97402
2010-02-28 18:08:38 +00:00
Anders Carlsson
b15d8c57ad
Add another construction vtable test.
...
llvm-svn: 97401
2010-02-28 17:59:36 +00:00
Anders Carlsson
e3385f566b
More improvements to construction vtables; we know handle vbase offsets correctly (I hope).
...
llvm-svn: 97361
2010-02-28 01:43:58 +00:00
Anders Carlsson
c3f92a16f2
Add a simple construction vtable test.
...
llvm-svn: 97344
2010-02-27 21:09:00 +00:00
Anders Carlsson
e02a926a1c
Use the real base offset when calculating vbase offsets.
...
llvm-svn: 97338
2010-02-27 19:21:58 +00:00
Anders Carlsson
2b381bbb5c
Don't add this adjustments for pure virtual member functions.
...
llvm-svn: 97334
2010-02-27 18:16:50 +00:00
Anders Carlsson
e6528ed7c5
Add another test.
...
llvm-svn: 97329
2010-02-27 16:55:58 +00:00
Anders Carlsson
4068798cbc
Finish up the changes to this adjustments.
...
llvm-svn: 97328
2010-02-27 16:52:49 +00:00
Anders Carlsson
d2025417ef
Fix another vtable layout bug; we weren't looking hard enough for overriden functions when determining if an overrider will ever be used.
...
llvm-svn: 97306
2010-02-27 06:38:03 +00:00
Anders Carlsson
d69b2f93ea
Handle vcall offset sharing between destructors.
...
llvm-svn: 97304
2010-02-27 04:12:52 +00:00
Anders Carlsson
b08aaa3e10
Fix a bug where we were generating an unnecessary vtable for a virtual base that's already a primary virtual base.
...
llvm-svn: 97303
2010-02-27 04:05:52 +00:00
Anders Carlsson
ed7d0e8be8
Fux a bug where we were trying to add overriders for non-virtual bases of virtual bases more than once.
...
llvm-svn: 97173
2010-02-25 22:18:35 +00:00
Anders Carlsson
0570f71255
More fixes. Don't try to emit a virtual base vtable if the virtual base in question is a primary virtual base of some other base.
...
llvm-svn: 96881
2010-02-23 03:48:14 +00:00
Anders Carlsson
bae46277fe
Always emit vcall offset for the primary base, not only if it's virtual. Remove a debug printf, and add the test case that now passes.
...
llvm-svn: 96880
2010-02-23 03:26:17 +00:00
Anders Carlsson
13f0f66223
Handle layout of vtables for virtual bases.
...
llvm-svn: 96355
2010-02-16 16:49:35 +00:00
Anders Carlsson
14157939ab
Fix a bug where we would not emit secondary vtables for bases of a primary base.
...
llvm-svn: 96351
2010-02-16 16:02:57 +00:00
Anders Carlsson
77904f1d5b
Emit vbase offsets.
...
llvm-svn: 96329
2010-02-16 04:59:55 +00:00
Anders Carlsson
033d48697f
Don't compute final overriders or build vtables for bases that don't need a vtable.
...
llvm-svn: 96171
2010-02-14 17:05:59 +00:00
Anders Carlsson
258a1e35e8
Improve support for non-virtual 'this' pointer adjustments. With this, it should be possible to use the new vtable layout code for all class hierarchies that do not involve virtual bases.
...
llvm-svn: 96137
2010-02-14 00:16:19 +00:00
Anders Carlsson
d3adb0ced9
Add basic support for simple non-virtual 'this' pointer adjustments.
...
llvm-svn: 96136
2010-02-13 23:40:17 +00:00
Anders Carlsson
e75aaa97b3
Start laying out secondary vtables.
...
llvm-svn: 96123
2010-02-13 22:05:23 +00:00
Anders Carlsson
c1290adab7
Don't make return adjustments for pure virtual member functions.
...
llvm-svn: 96120
2010-02-13 21:16:54 +00:00
Anders Carlsson
cf5a882da1
Handle virtual bases in return adjustment types.
...
llvm-svn: 96119
2010-02-13 21:07:32 +00:00
Anders Carlsson
6a6cbfc55f
More work on covariant return types. We now handle non-virtual adjustments fine.
...
llvm-svn: 96114
2010-02-13 20:11:51 +00:00
Anders Carlsson
e8a9756e63
Keep track of the address points for all primary bases, and add the ability to dump multiple address points for a single offset.
...
llvm-svn: 95970
2010-02-12 07:43:48 +00:00
John McCall
84c416b9f6
Fix a bug causing an assertion when a covariant return type differed from
...
an overriden type only by reduced qualification.
llvm-svn: 95968
2010-02-12 06:15:07 +00:00
Anders Carlsson
65b4978f7f
More work on vtable layout. We can now layout vtables with primary bases.
...
llvm-svn: 95965
2010-02-12 05:25:12 +00:00
Anders Carlsson
09da3372b6
When dumping vtables, dump whether a virtual member function is pure or not.
...
llvm-svn: 95963
2010-02-12 02:38:13 +00:00
Anders Carlsson
48ea217fbf
Add virtual operator= example.
...
llvm-svn: 95888
2010-02-11 18:21:49 +00:00
Anders Carlsson
5bd8d19291
More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName.
...
llvm-svn: 95887
2010-02-11 18:20:28 +00:00
Anders Carlsson
932c2f2a9a
Keep track of, and dump, vtable address points.
...
llvm-svn: 95874
2010-02-11 17:18:51 +00:00
Anders Carlsson
5d40c6f658
Check in the beginnings of my new vtable layout builder idea.
...
Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code.
I've also added a very simple new vtable layout test case.
llvm-svn: 95865
2010-02-11 08:02:13 +00:00