Anders Carlsson
|
93b1b49082
|
Simplify code.
llvm-svn: 97551
|
2010-03-02 05:40:45 +00:00 |
|
Anders Carlsson
|
6f1f002651
|
Rename BaseOffset to Offset and make it signed in preparation of more construction vtable work.
llvm-svn: 97546
|
2010-03-02 03:44:06 +00:00 |
|
Anders Carlsson
|
5b79c31471
|
Remove debug output.
llvm-svn: 97407
|
2010-02-28 18:39:30 +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
|
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
|
62c6c72bab
|
Pass information about whether a base is virtual or not down to getCtorVtable, we need this information in the vtable builder.
llvm-svn: 97356
|
2010-02-28 00:36:23 +00:00 |
|
Anders Carlsson
|
31f595f5ef
|
Add new function.
llvm-svn: 97353
|
2010-02-28 00:10:58 +00:00 |
|
Anders Carlsson
|
f98b47d3b9
|
Fix to dumpLayout; we want to be able to dump address points even if the vtable doesn't have any methods.
llvm-svn: 97350
|
2010-02-27 23:58:01 +00:00 |
|
Anders Carlsson
|
c3f92a16f2
|
Add a simple construction vtable test.
llvm-svn: 97344
|
2010-02-27 21:09:00 +00:00 |
|
Anders Carlsson
|
9391375d95
|
Start fleshing out construction vtable support.
llvm-svn: 97342
|
2010-02-27 20:39:05 +00:00 |
|
Anders Carlsson
|
603d7d1910
|
Enable the new vtable layout code for vtables that aren't construction vtables. (This doesn't mean that we emit LLVM IR using it yet, it just means that it's running and hopefully not crashing or asserting).
llvm-svn: 97341
|
2010-02-27 20:02:53 +00:00 |
|
Anders Carlsson
|
9f19aaaa3a
|
Move ComputeThisAdjustmentBaseOffset to VtableBuilder.
llvm-svn: 97340
|
2010-02-27 19:57:44 +00:00 |
|
Anders Carlsson
|
b26c2abac7
|
Make sure to insert the primary base in the set :)
llvm-svn: 97339
|
2010-02-27 19:51:04 +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
|
4d0729a7cc
|
Figured out why the test was failing, this will hopefully fix it.
llvm-svn: 97336
|
2010-02-27 19:00:53 +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
|
01d3c7da60
|
We want to store method info for unused functions.
llvm-svn: 97333
|
2010-02-27 18:09:40 +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
|
d46ed89d79
|
Stub out more of the 'this' pointer adjustment fixes I've been planning. Start using a set vector for primary bases so they will be ordered.
llvm-svn: 97326
|
2010-02-27 16:18:19 +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 |
|
John McCall
|
43c6ffbeec
|
Sundry fixes to the new vtable builder.
llvm-svn: 97258
|
2010-02-26 20:22:44 +00:00 |
|
Anders Carlsson
|
9e3b3a3bbe
|
Improve vcall offset handling.
llvm-svn: 97174
|
2010-02-25 22:23:13 +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
|
01bbef516e
|
Remove dead code.
llvm-svn: 97109
|
2010-02-25 03:57:50 +00:00 |
|
Anders Carlsson
|
422f778ba1
|
Move the vcall and vbase offset layout code out into its own class.
llvm-svn: 97107
|
2010-02-25 03:45:56 +00:00 |
|
Anders Carlsson
|
3c1ec97a28
|
Get rid of 'this' adjustments from the FinalOverriders class since they can be different for the same overrider in different parts of the vtable.
llvm-svn: 97068
|
2010-02-24 22:32:18 +00:00 |
|
Anders Carlsson
|
d8d698da60
|
Improve this adjustment pointer calculation.
llvm-svn: 97067
|
2010-02-24 22:27:12 +00:00 |
|
Anders Carlsson
|
8025e7b1b9
|
Make ComputeThisAdjustmentBaseOffset public for now.
llvm-svn: 97066
|
2010-02-24 22:18:01 +00:00 |
|
Anders Carlsson
|
a9f633b060
|
Generate correct vcall offsets when we have a primary virtual base that is not a primary base in the complete class hierarchy.
llvm-svn: 97039
|
2010-02-24 16:43:12 +00:00 |
|
Anders Carlsson
|
8939e400b6
|
Implement IsOverriderUsed. This can't be tested yet due to some other bugs :)
llvm-svn: 96897
|
2010-02-23 06:34:44 +00:00 |
|
Anders Carlsson
|
a8796c692c
|
Stub out IsOverriderUsed.
llvm-svn: 96883
|
2010-02-23 04:26:39 +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
|
510d22d097
|
Simplify the vcall offset calculation and make it give the correct answers :) My test case now has the right values but in the wrong order.
llvm-svn: 96877
|
2010-02-23 03:14:49 +00:00 |
|
Anders Carlsson
|
30f5301e54
|
More work on vcall offsets. We now emit the right number of vcall offsets in my local test case, but not the right values.
llvm-svn: 96874
|
2010-02-23 02:47:31 +00:00 |
|
Anders Carlsson
|
075056a8f9
|
Move BaseOffset out of the FinalOverriders class.
llvm-svn: 96853
|
2010-02-23 01:34:28 +00:00 |
|
Douglas Gregor
|
f4f2e0247f
|
Change the name of the vtable-debugging environment variable to
CLANG_VTABLE_DEBUG.
llvm-svn: 96785
|
2010-02-22 16:48:26 +00:00 |
|
Douglas Gregor
|
76eb74a1cd
|
Don't use NamedDecl::getNameAsCString() when dealing with C++ methods,
since they may not have normal identifiers for names. Fixes PR6369.
llvm-svn: 96784
|
2010-02-22 16:44:27 +00:00 |
|
Anders Carlsson
|
350b56eed5
|
Add the CK_UnusedFunctionPointer component kind for unused function pointers.
llvm-svn: 96695
|
2010-02-19 20:08:13 +00:00 |
|
Anders Carlsson
|
2d3d903872
|
Dump this-adjustments for destructors as well.
llvm-svn: 96660
|
2010-02-19 06:03:53 +00:00 |
|
Anders Carlsson
|
f8b53536ed
|
Attempt to fix the 32-bit test failures.
llvm-svn: 96595
|
2010-02-18 18:20:49 +00:00 |
|
Anders Carlsson
|
e5faca7cda
|
Fix another bug and add another class.
llvm-svn: 96590
|
2010-02-18 17:32:33 +00:00 |
|
Anders Carlsson
|
8847d9e40a
|
More work on vcall offsets.
llvm-svn: 96587
|
2010-02-18 17:26:40 +00:00 |
|
Anders Carlsson
|
78277c7705
|
Start stubbing out vcall offset handling.
llvm-svn: 96585
|
2010-02-18 17:00:09 +00:00 |
|
Anders Carlsson
|
5a7654a9d8
|
Store the base offset of the final overrider in the OverriderInfo struct, to be used for vcall offsets.
llvm-svn: 96582
|
2010-02-18 16:29:24 +00:00 |
|
Anders Carlsson
|
c8316a2e08
|
Remove some dead code.
llvm-svn: 96581
|
2010-02-18 16:24:20 +00:00 |
|
Chris Lattner
|
d2408f78a5
|
silence warning in a cleaner way
llvm-svn: 96520
|
2010-02-17 21:42:34 +00:00 |
|