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 |
Anders Carlsson
|
231461f88f
|
Make FinalOverriders handle virtual bases correctly. Unfortunately this can't be tested just yet.
llvm-svn: 96481
|
2010-02-17 17:48:25 +00:00 |
Anders Carlsson
|
d2fd302726
|
Handle primary bases in AddVCallOffsets.
llvm-svn: 96461
|
2010-02-17 06:30:02 +00:00 |
Chandler Carruth
|
c20a9586c4
|
Silence GCC warning by marking an assert-only variable as unused.
llvm-svn: 96459
|
2010-02-17 06:24:18 +00:00 |
Anders Carlsson
|
b0a588f038
|
First cut at emitting vcall offsets.
llvm-svn: 96455
|
2010-02-17 06:07:19 +00:00 |
Anders Carlsson
|
db042200c0
|
Pass through whether a base is virtual or not.
llvm-svn: 96449
|
2010-02-17 03:11:55 +00:00 |
Anders Carlsson
|
03db9e9cd3
|
Correctly calculate base offsets for 'this' pointer adjustments involving virtual bases. This can't be tested yet due to lack of vcall offsets :)
llvm-svn: 96441
|
2010-02-17 02:05:23 +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
|
b716a543c9
|
Move some code around in preparation for virtual base vtables.
llvm-svn: 96354
|
2010-02-16 16:26:28 +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
|
dc2dba306c
|
More work on the new layout code.
llvm-svn: 96328
|
2010-02-16 04:49:44 +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
|
073a0c88cc
|
Build fix.
llvm-svn: 96140
|
2010-02-14 00:44:19 +00:00 |
Anders Carlsson
|
6a7e6a4c3c
|
Baby steps towards teaching FinalOverriders about virtual bases.
llvm-svn: 96139
|
2010-02-14 00:37:35 +00:00 |
Anders Carlsson
|
1888b44988
|
Don't try to layout construction vtables for now.
llvm-svn: 96138
|
2010-02-14 00:22: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
|
cce9ee8970
|
Add support for very simple non-virtual this adjustments in the FinalOverriders class.
llvm-svn: 96133
|
2010-02-13 23:17:31 +00:00 |
Anders Carlsson
|
c809cbdc3f
|
Cleanup; remove some duplicated code.
llvm-svn: 96131
|
2010-02-13 22:39:18 +00:00 |
Anders Carlsson
|
a678aa1e51
|
Assert if we encounter this adjustments.
llvm-svn: 96125
|
2010-02-13 22:23:31 +00:00 |
Anders Carlsson
|
e75aaa97b3
|
Start laying out secondary vtables.
llvm-svn: 96123
|
2010-02-13 22:05:23 +00:00 |
Anders Carlsson
|
3f9917de6e
|
Merge base offsets and dump them.
llvm-svn: 96121
|
2010-02-13 21:33:22 +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
|
f3f67846c8
|
Handle virtual bases in ComputeBaseOffset.
llvm-svn: 96117
|
2010-02-13 20:41:15 +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 |
Chandler Carruth
|
a932bbca75
|
Fix think-o, attributes can't come *within* the type of the variable.
llvm-svn: 96099
|
2010-02-13 10:42:55 +00:00 |
Chandler Carruth
|
94eab4ad04
|
Silence unused variable warning in a build without assertions.
llvm-svn: 96098
|
2010-02-13 10:38:52 +00:00 |
Benjamin Kramer
|
e047e11189
|
Remove dead {include, semicolon, variable}.
llvm-svn: 96087
|
2010-02-13 09:15:07 +00:00 |
Benjamin Kramer
|
02c673781d
|
Use a different name for this iterator. MSVC and clang++ didn't like "I" in the same scope twice.
llvm-svn: 96086
|
2010-02-13 09:11:28 +00:00 |
Anders Carlsson
|
eee53d9c06
|
More work on return type adjustments in the new vtable builder.
llvm-svn: 96070
|
2010-02-13 02:02:03 +00:00 |
John McCall
|
ef3057c419
|
Switch the standard DeclarationName comparator to be a tri-valued comparator.
Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow,
has not actually caused a crash.
llvm-svn: 96062
|
2010-02-13 01:04:05 +00:00 |
Eli Friedman
|
18c28f6cdc
|
if-0 out printf.
llvm-svn: 96052
|
2010-02-13 00:03:21 +00:00 |
Anders Carlsson
|
0760481f26
|
Fix a refacto that broke the clang-on-clang build.
llvm-svn: 95994
|
2010-02-12 18:14:46 +00:00 |
Anders Carlsson
|
5272c2574a
|
Start stubbing out more of the covariant thunk support.
llvm-svn: 95990
|
2010-02-12 17:37:14 +00:00 |
Anders Carlsson
|
8e661e15f2
|
Keep track of whether a final overrider needs a return type adjustment.
llvm-svn: 95985
|
2010-02-12 17:13:23 +00:00 |