Peter Collingbourne
24018467dd
Move VTable builder to AST
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140510 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 01:57:12 +00:00
Peter Collingbourne
ab172b5858
Have CodeGenVTables::GenerateConstructionVTable use VTableLayout
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140509 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 01:57:04 +00:00
Peter Collingbourne
9984d12729
Move vtable dumper call to VTableBuilder ctor
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140508 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 01:57:00 +00:00
Peter Collingbourne
e00fe697cc
Implement VTableContext::createConstructionVTableLayout
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140507 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 01:56:55 +00:00
Peter Collingbourne
e09cdf46aa
Move all vtable layout data into new VTableLayout class
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140506 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 01:56:50 +00:00
Peter Collingbourne
ba6ffeb51f
Move VTableComponent to header file
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140505 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 01:56:45 +00:00
Peter Collingbourne
84fcc48817
Move vtable component accessors to VTableContext
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140504 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 01:56:41 +00:00
Peter Collingbourne
bf1c5aeadc
Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGen
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140503 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 01:56:36 +00:00
Peter Collingbourne
1d2b317105
Create a VTableContext class and start moving CodeGenVTables methods to it
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140502 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 01:56:30 +00:00
David Blaikie
eb2d1f1c88
Removing a bunch of dead returns/breaks after llvm_unreachables.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23 20:26:49 +00:00
David Blaikie
b219cfc4d7
Switch assert(0/false) llvm_unreachable.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23 05:06:16 +00:00
Douglas Gregor
bcfd1f55bf
Extend the ASTContext constructor to delay the initialization of
...
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138985 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-02 00:18:52 +00:00
Eli Friedman
03f486168f
Revert bad change. (It may look equivalent, but it isn't.)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137132 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 18:16:09 +00:00
Eli Friedman
c55db3b76d
Cleanup; no functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137126 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 17:38:12 +00:00
Chris Lattner
5f9e272e63
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
...
them into the clang namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 10:55:15 +00:00
Chris Lattner
2acc6e3fed
de-constify llvm::Type, patch by David Blaikie!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135370 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 04:24:23 +00:00
Chris Lattner
f742eb0196
Rename CGT::VerifyFuncTypeComplete to isFuncTypeConvertible since
...
it is a predicate, not an action. Change the return type to be a bool,
not the incomplete member. Enhace it to detect the recursive compilation
case, allowing us to compile Eli's testcase on llvmdev:
struct T {
struct T (*p)(void);
} t;
into:
%struct.T = type { {}* }
@t = common global %struct.T zeroinitializer, align 8
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134853 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-10 00:18:59 +00:00
Jay Foad
97357602a2
Replace the existing forms of ConstantArray::get() with a single form
...
that takes an ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133615 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 09:24:39 +00:00
Anders Carlsson
e3d6cf2149
Fix another regression from the "skip vtable pointer initialization"
...
optimization. Make sure to require a vtable when trying to get the address
of a VTT, otherwise we would never end up emitting the VTT.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131400 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-16 04:08:36 +00:00
Eli Friedman
7dcdf5ba93
Add an implementation of thunks for varargs methods. The implementation is a bit messy, but it is correct as long as the method in question doesn't use indirect gotos. A couple of possible alternative implementations are outlined in FIXME's in this patch. rdar://problem/8077308 .
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130993 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-06 17:27:27 +00:00
Eli Friedman
04c9a49ee2
Simplify code a bit by using CallArgList::add. No intended functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130699 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-02 17:57:46 +00:00
Anders Carlsson
b8bced0b75
Change CollectPrimaryBases to collect the bases in the right order. Fixes one half of PR9660.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129252 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10 18:00:32 +00:00
Anders Carlsson
d24e50c2e6
Make -fdump-vtable-layouts also dump vtable indices for all virtual member functions in the class.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129250 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10 17:42:45 +00:00
Ken Dyck
14c65ca4cd
[Reapply r128776, modified so that it does not break debug info.]
...
Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129072 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-07 12:37:09 +00:00
Ken Dyck
1a7f7526b7
[Reapply r128773. This is not the source of the issues Devang was seeing
...
with debug info.]
Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No
change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129048 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-07 01:22:42 +00:00
Ken Dyck
3015c4c7d4
[Reapply r128771. It wasn't the source of the issues Devang saw with debug
...
info.]
Use CharUnits for the offset type in the ClassNamesAndOffsets map in
dumpLayout(). No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129046 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-07 00:59:42 +00:00
Ken Dyck
d28c33caf3
Reapply r128770. It's not the cause of the issues Devang saw with debug info.
...
Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129043 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-07 00:55:01 +00:00
Devang Patel
62c117db25
Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128842 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-04 20:36:06 +00:00
Ken Dyck
4fbabd37fd
Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
...
CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128776 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02 17:52:22 +00:00
Ken Dyck
d221532188
Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No
...
change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128773 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02 17:13:02 +00:00
Ken Dyck
2c026e1baa
Use CharUnits for the offset type in the ClassNamesAndOffsets map in
...
dumpLayout(). No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128771 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02 17:03:24 +00:00
Ken Dyck
e3e34e9164
Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
...
change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128770 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02 16:57:20 +00:00
Ken Dyck
396e4f672b
Convert BaseOffset::NonVirtualOffset to CharUnits. No change in
...
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128756 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02 01:32:03 +00:00
Ken Dyck
c40a3fdf9b
Convert offset parameters and return values of VTableComponent methods to
...
CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128754 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02 01:14:48 +00:00
Ken Dyck
c952d38437
Convert the offsets in VCallOffsetMap to CharUnits. No change in
...
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128753 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02 00:51:15 +00:00
Ken Dyck
413e7d216d
Convert offset parameters of VTableBuilder::IsOverriderUsed() to CharUnits.
...
No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128752 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02 00:44:58 +00:00
Ken Dyck
3ed994bbdb
Convert the return value of
...
VCallAndVBaseOffsetBuilder::getCurrentOffsetOffset() to CharUnits. No change
in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128603 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-31 01:08:46 +00:00
Ken Dyck
bb625e9692
Convert the OffsetInLayoutClass parameter of
...
VCallAndVBaseOffsetBuilder::AddVBaseOffsets() to CharUnits. No change in
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128600 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-31 00:56:47 +00:00
Ken Dyck
3ecfa2d321
Convert the OffsetInLayoutClass of the VCallAndVBaseOffsetBuilder
...
constructor to CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128598 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-31 00:48:04 +00:00
Ken Dyck
f38d8ae5a0
Convert the RealBaseOffset parameter of
...
VCallAndVBaseOffsetBuilder::AddVCallAndVBaseOffsets() to
CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128596 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-31 00:37:24 +00:00
Jay Foad
bbf3bacb3e
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
...
PHINode::Create() giving the (known or expected) number of operands.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128538 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 11:28:58 +00:00
Ken Dyck
301af86e8d
Convert the offset parameter of
...
VCallAndVBaseOffsetBuilder::AddVCallOffsets() to CharUnits. No change in
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128531 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 10:11:40 +00:00
Ken Dyck
0c64b7dcf1
Convert local offset variable to CharUnits in AddVCallOffsets. No change in
...
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128522 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 01:21:33 +00:00
Ken Dyck
7262e90a10
Convert a local offset variable to CharUnits. No change in functionality
...
intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128521 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 01:14:22 +00:00
Ken Dyck
8fe599325e
Convert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()
...
to CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128520 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 01:10:23 +00:00
Ken Dyck
75762b35a8
Convert the OffsetInLayoutClass parameter of LayoutSecondaryVTables to
...
CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128516 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 00:50:28 +00:00
Ken Dyck
7ba8f522f3
Convert offset parameter in LayoutPrimaryAndSecondaryVTables() to CharUnits.
...
No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128393 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27 20:33:38 +00:00
Ken Dyck
23da84a4eb
Convert VTableBuilder::MostDerivedClassOffset to CharUnits. No change in
...
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128392 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27 20:20:28 +00:00
Ken Dyck
fc72420a22
Convert FinalOverriders::MostDerivedClassOffset to CharUnits. No change in
...
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128391 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27 20:10:29 +00:00
Ken Dyck
9198e39912
Remove a fixed FIXME comment (the base offset has already been converted to
...
CharUnits).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128386 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27 19:19:52 +00:00