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
Anders Carlsson
136bd19224
Move overrider out into a separate struct.
...
llvm-svn: 95984
2010-02-12 16:55:34 +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
9fbf6d95f6
More work on the final overriders.
...
llvm-svn: 95954
2010-02-12 01:40:03 +00:00
Anders Carlsson
e8ac42ad5c
Stub out the final overriders class.
...
llvm-svn: 95922
2010-02-11 21:24:32 +00:00
Anders Carlsson
dd27b5d7bb
Use getAs instead of cast/dyn_cast on types. (I'm sure Doug will appreciate this).
...
llvm-svn: 95911
2010-02-11 19:45:15 +00:00
Anders Carlsson
727ffb14a1
Move two functions to the top. No functionality change.
...
llvm-svn: 95908
2010-02-11 19:39: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
Chris Lattner
eb1e610d00
remove a big chunk of #if 0 code.
...
llvm-svn: 95201
2010-02-03 05:28:17 +00:00
Anders Carlsson
259688ce29
Move pointer to data member emission to CodeGenModule and use it in CGExprConstant. Fixes PR5674.
...
llvm-svn: 95063
2010-02-02 03:37:46 +00:00
Mike Stump
ded0a406b4
Refine the non-virtual this adjustments for thunks by using the offset
...
to the declaring class from the nearest virtual base class. WIP.
llvm-svn: 94606
2010-01-26 22:44:01 +00:00
Mike Stump
a04ecfb701
Refine the non-virtual this adjustments for thunks by using the offset
...
to the declaring class from the nearest virtual base class. WIP.
This fixes 40% of all the problems remaining in one of my testcases.
llvm-svn: 94592
2010-01-26 21:35:27 +00:00
Anders Carlsson
7228117108
Change getUnique to return a GlobalDecl. Fixes PR6147.
...
llvm-svn: 94554
2010-01-26 17:36:47 +00:00
Mike Stump
77537b136e
Be sure to track the non-virtual part of the vcall offset in complex
...
multiple inheritance cases. WIP.
This fixes 20% of the outstanding problems found by the randomized
tester.
llvm-svn: 94499
2010-01-26 03:42:22 +00:00
Mike Stump
90181eb294
Fixup a missing vcall entry. WIP.
...
llvm-svn: 94478
2010-01-26 00:05:04 +00:00
Mike Stump
1f49d65235
Finish off fixing up debug information.
...
llvm-svn: 94193
2010-01-22 18:48:47 +00:00
Mike Stump
9eb76d47f2
Ensure we output all non-virtual base vtables. Fixes PR5890.
...
llvm-svn: 94163
2010-01-22 06:45:05 +00:00
Mike Stump
d2808449e4
Update debugging code.
...
llvm-svn: 94145
2010-01-22 02:51:26 +00:00
Anders Carlsson
f768db7775
Move the VTT related code into its own file, CGVTT.cpp
...
llvm-svn: 94079
2010-01-21 16:50:45 +00:00
Anders Carlsson
07894e8a0e
More VTT builder fixes. With these fixes we now correctly handle the very complex VTT example from the Itanium ABI spec.
...
llvm-svn: 93725
2010-01-18 17:13:59 +00:00
Anders Carlsson
3d1a09552c
Move some common code into BuildVTT.
...
llvm-svn: 93710
2010-01-18 04:45:46 +00:00
Anders Carlsson
1af3df854f
Fix a bunch of VTT layout bugs, add simple tests for VTT layout.
...
llvm-svn: 93709
2010-01-18 04:25:18 +00:00
Anders Carlsson
827b245fd6
Minor VTT builder cleanup, no functionality change.
...
llvm-svn: 93696
2010-01-17 23:53:20 +00:00
Anders Carlsson
42f1376f35
Get the ctor vtable address points directly from the VTT builder.
...
llvm-svn: 93681
2010-01-17 17:10:44 +00:00
Anders Carlsson
5f9a881e1e
Store the address points for constructor vtables directly in the VTT builder, because that's the only time they're needed.
...
llvm-svn: 93412
2010-01-14 02:29:07 +00:00