Anders Carlsson
c38b40a709
Store a GlobalDecl in the return adjustment.
...
llvm-svn: 90387
2009-12-03 02:03:29 +00:00
Anders Carlsson
2bd3c0fa34
Do not include the 'this' pointer adjustment in the covariant return type. Instead, store it in the (now oddly named) Thunks map.
...
llvm-svn: 90386
2009-12-03 01:58:20 +00:00
Anders Carlsson
ca1bf68cfb
Move VtableBuilder::OverrideMethod out of line in preparation of other changes to it. No functionality change.
...
llvm-svn: 90382
2009-12-03 01:54:02 +00:00
Mike Stump
8a96d3a355
Turn off for now.
...
llvm-svn: 90339
2009-12-02 19:50:41 +00:00
Mike Stump
ae1b85d984
Put the Builder classes into the anonymous namespace.
...
llvm-svn: 90335
2009-12-02 19:07:44 +00:00
Mike Stump
c01c2b87e8
Change rtti/Rtti to RTTI, as it is an acronym.
...
llvm-svn: 90334
2009-12-02 18:57:08 +00:00
Anders Carlsson
b1d3f7c909
Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug.
...
llvm-svn: 90168
2009-11-30 23:41:22 +00:00
Anders Carlsson
c920fa2a74
Fix an assert.
...
llvm-svn: 90149
2009-11-30 19:43:26 +00:00
Eli Friedman
03aa2f1262
Minor cleanup (no functionality change).
...
llvm-svn: 90105
2009-11-30 01:19:33 +00:00
Benjamin Kramer
337e3a5fea
Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.
...
llvm-svn: 90044
2009-11-28 19:45:26 +00:00
Anders Carlsson
548cc9d143
We always want to create a virtual function pointer entry if the path from the derived return value to the base overridden return value contains a virtual base class.
...
llvm-svn: 90024
2009-11-28 03:03:52 +00:00
Anders Carlsson
d598850203
Move the vtable builder to an anonymous namespace.
...
llvm-svn: 90021
2009-11-27 22:21:51 +00:00
Anders Carlsson
f942ee0297
Don't build the entire vtable when all we want is the index of a virtual method.
...
llvm-svn: 90017
2009-11-27 20:47:55 +00:00
Anders Carlsson
323bb04ef4
Lazily create the __cxa_pure_virtual reference.
...
llvm-svn: 89965
2009-11-26 19:54:33 +00:00
Anders Carlsson
d420a31fe9
Use the new CovariantThunkAdjustment in the vtable builder.
...
Make the pure virtual methods map a set instead.
llvm-svn: 89961
2009-11-26 19:32:45 +00:00
Anders Carlsson
6d771bcd09
Add a Thunk struct to the vtable builder.
...
llvm-svn: 89935
2009-11-26 03:25:13 +00:00
Anders Carlsson
2f87c4f1a5
Add a CovariantThunkAdjustment struct that represents the adjustments needed for a covariant thunk.
...
llvm-svn: 89933
2009-11-26 03:09:37 +00:00
Anders Carlsson
c778540f9a
Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp.
...
llvm-svn: 89925
2009-11-26 02:32:05 +00:00
Anders Carlsson
6445773279
It is common for vtables to contain pointers to functions that have either incomplete return types or incomplete argument types.
...
Handle this by returning the llvm::OpaqueType for those cases, which CodeGenModule::GetOrCreateLLVMFunction knows about, and treats as being an "incomplete function".
llvm-svn: 89736
2009-11-24 05:08:52 +00:00
Daniel Dunbar
e128dd18ab
IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,
...
instead of requiring clients to make a raw_svector_ostream, which is just an
implementation detail.
llvm-svn: 89548
2009-11-21 09:06:22 +00:00
Daniel Dunbar
ef5d75afeb
Sink free mangle* methods into MangleContext.
...
llvm-svn: 89547
2009-11-21 09:06:10 +00:00
Mike Stump
cd2b821241
Fixup address point computations. WIP.
...
llvm-svn: 89386
2009-11-19 20:52:19 +00:00
Mike Stump
aa51ad6815
Refine vtable, rtti and rtti name instantiation so that they follow
...
the key function. All the code is wired up, but won't work yet, as I
had to turn off key function calculation as it doesn't work yet.
Also, we refine visibility of the vtable, rtti and rtti name to match
the class, as well as as arrange for all the symbols to be internal
for anonymous namespace entities.
llvm-svn: 89309
2009-11-19 04:04:36 +00:00
Mike Stump
1a139f8fb5
Improve instantiation control for rtti data and allow key functions to
...
instantiate a class. WIP.
llvm-svn: 89289
2009-11-19 01:08:19 +00:00
Mike Stump
1960b20403
Refine linkage on thunks. WIP.
...
llvm-svn: 89287
2009-11-19 00:49:05 +00:00
Mike Stump
c0f632d6b2
Set up vtable visibility appropriately.
...
llvm-svn: 89193
2009-11-18 04:00:48 +00:00
Mike Stump
f5b2869b75
Finisgh off rest of class_type_info rtti generation.
...
llvm-svn: 88823
2009-11-14 23:32:21 +00:00
Mike Stump
c5a332cefb
Handle descructor printing better.
...
llvm-svn: 88723
2009-11-13 23:45:53 +00:00
Mike Stump
559387fe8b
Also track address points for primaries bases.
...
llvm-svn: 88717
2009-11-13 23:13:20 +00:00
Anders Carlsson
fb4dda4fed
Instead of storing CXXMethodDecls in the vtable builder, store GlobalDecls so we can represent both the complete and deleting destructors. Also, when encountering a destructor decl, emit entries for both the complete and deleting destructors. Mike, please review.
...
With this change, FileCheck builds and runs the clang test suite without failures!
llvm-svn: 88663
2009-11-13 17:08:56 +00:00
Zhongxing Xu
1721ef7a53
Include header for printf.
...
llvm-svn: 87086
2009-11-13 05:46:16 +00:00
Mike Stump
fa81808a11
Refine construction vtables; they don't include bits that don't have
...
virtual bases unless they are morally virtual.
llvm-svn: 87071
2009-11-13 02:35:38 +00:00
Mike Stump
653d0b99df
Refine the construction vtables with respect to offsets. WIP.
...
llvm-svn: 87067
2009-11-13 02:13:54 +00:00
Mike Stump
83066c8dee
Allow the tracking of address points for construction vtables as well.
...
llvm-svn: 87063
2009-11-13 01:54:23 +00:00
Mike Stump
2b34bc5a96
Refine which vtbl is refernced in VTTs.
...
llvm-svn: 87043
2009-11-12 23:36:21 +00:00
Mike Stump
ca0de33113
Refine offsets into vtables for the VTT.
...
llvm-svn: 87041
2009-11-12 23:14:15 +00:00
Mike Stump
8677bc27bf
Refine vtable pointers for secondary vtables inside VTTs to point to
...
the right base vtable. WIP.
llvm-svn: 87039
2009-11-12 22:56:32 +00:00
Mike Stump
2cefe38365
Fix the offset calculations for non-virtual bases with overrides.
...
Refine the VTT entries for virtual bases to refer to the complete
object's vtable instead of constructor vtables.
Refine the AddressPoint calculations for VTT entries for virtual bases.
llvm-svn: 87021
2009-11-12 20:47:57 +00:00
Mike Stump
fd84d6d808
Fix ctor vtable name. WIP.
...
llvm-svn: 86879
2009-11-11 20:32:03 +00:00
Mike Stump
eac4559790
Push ctor vtable construction down further. WIP.
...
llvm-svn: 86878
2009-11-11 20:26:26 +00:00
Mike Stump
c7b9f5e762
More VTT work. We now track offsets and use the ctor vtable builder
...
interface. WIP.
llvm-svn: 86793
2009-11-11 03:08:24 +00:00
Mike Stump
8b2d2d0707
Stub out most of the VTT building code. WIP.
...
llvm-svn: 86772
2009-11-11 00:35:07 +00:00
Mike Stump
b47222144b
Only generate a VTT for classes that need a VTT.
...
llvm-svn: 86699
2009-11-10 19:13:04 +00:00
Mike Stump
d846d0825b
Add vtable caching to prevent multiple vtables for the same class from
...
being generated.
Add the most derived vtable pointer to the VTT.
llvm-svn: 86671
2009-11-10 07:44:33 +00:00
Mike Stump
9f23a149cb
Be sure to clear out VCall when we clear out VCalls.
...
Start implementing VTTs. WIP.
llvm-svn: 86650
2009-11-10 02:30:51 +00:00
Mike Stump
cd6f9ed906
Refine the non-virtual this adjustment. Optimize out virtual this
...
adjustments of zero.
llvm-svn: 86300
2009-11-06 23:27:42 +00:00
Mike Stump
72431bd9ea
Refine the vcall for a function that is defined in a virtual base
...
class that is overridden in a base that isn't morally virtual.
llvm-svn: 86217
2009-11-06 02:38:24 +00:00
Mike Stump
4627132ebc
Refine codegen for covariant thunks that return references.
...
llvm-svn: 85916
2009-11-03 19:03:17 +00:00
Mike Stump
75ce573815
Refine vcall/vbase ordering with vtable construction.
...
llvm-svn: 85677
2009-10-31 20:06:59 +00:00
Mike Stump
476e2dfe19
Refactor a bit.
...
llvm-svn: 85424
2009-10-28 20:44:03 +00:00