Commit Graph

2574 Commits

Author SHA1 Message Date
Benjamin Kramer 62ab616666 Return bool as a bool instead of a uint64_t.
llvm-svn: 90610
2009-12-04 22:45:27 +00:00
Alexis Hunt 9b3a395bf3 Put in FIXME that this mangling is not official in.
llvm-svn: 90594
2009-12-04 21:11:13 +00:00
Alexis Hunt bf2f0c2e34 Switch mangling of literal operator names to a string that's
a) legal
 b) likely to be chosen as the official mangling

This will break ABI compatibility with all literal operator names,
so you may need to recompile any such code. Sorry.

llvm-svn: 90587
2009-12-04 21:01:37 +00:00
Mike Stump afe4764fa5 Be sure to instantiate rtti for non-polymorphic bases.
llvm-svn: 90586
2009-12-04 20:55:13 +00:00
Anders Carlsson ce460529c0 When generating a virtual destructor, don't try to make a virtual call to the base class destructor because then we'll just re-enter the same destructor!
This was done to fix PR5619, so I went ahead and passed a dummy VTT pointer for now.

llvm-svn: 90578
2009-12-04 19:33:17 +00:00
Mike Stump 875912ac13 Fixup nested try blocks.
llvm-svn: 90576
2009-12-04 19:21:57 +00:00
Mike Stump 5c820758f5 Fix warning and be sure to set up the rethrow pointer if we fall off
the end of all the catches.

llvm-svn: 90574
2009-12-04 19:03:47 +00:00
Anders Carlsson bad80eb792 Rename 'Class' to 'MostDerivedClass'
llvm-svn: 90573
2009-12-04 18:36:22 +00:00
Anders Carlsson 19462d681a Store the vtable components in a SmallVector.
llvm-svn: 90571
2009-12-04 16:24:46 +00:00
Anders Carlsson 4e1d75f3ed Use a different ConstantArray::get.
llvm-svn: 90570
2009-12-04 16:22:27 +00:00
Anders Carlsson 472404f8a6 Move the vtable vector directly into the Vtable builder.
llvm-svn: 90569
2009-12-04 16:19:30 +00:00
Anders Carlsson 7bb7076b51 Change getIndex to return false if the index wasn't found. Avoids an extra hash lookup.
llvm-svn: 90568
2009-12-04 15:49:02 +00:00
Eli Friedman 65d87222b2 Minor cleanup; no functionality change.
llvm-svn: 90565
2009-12-04 08:52:11 +00:00
Eli Friedman 81fb0d2656 Remove unused argument.
llvm-svn: 90563
2009-12-04 08:40:51 +00:00
Eli Friedman c07aebee90 Eliminate submethods vector.
llvm-svn: 90562
2009-12-04 08:36:58 +00:00
Eli Friedman 3d2e9de337 Eliminate the inner loop in VtableBuilder::OverrideMethod.
llvm-svn: 90561
2009-12-04 08:34:14 +00:00
Anders Carlsson 5c9e7b16a5 Correctly mangle the 'std' namespace inside extern "C++" blocks.
llvm-svn: 90544
2009-12-04 06:23:23 +00:00
Anders Carlsson f3935b4d4b Make sure that overridden method decls are always canonical.
llvm-svn: 90542
2009-12-04 05:51:56 +00:00
Eli Friedman 94bc2dade6 Fix regression in vtable improvements.
llvm-svn: 90540
2009-12-04 04:30:03 +00:00
Mike Stump 8c1253b4c2 Try/catch statements seem to be working well enough to turn on.
llvm-svn: 90538
2009-12-04 03:57:07 +00:00
Mike Stump 2ab55765f7 Disable for now, doesn't play nice with the temporary code.
llvm-svn: 90537
2009-12-04 03:55:53 +00:00
Eli Friedman b05eb963e0 Rename method to something easier to search for.
llvm-svn: 90536
2009-12-04 03:54:56 +00:00
Anders Carlsson a93e980fbc More work in preparation of getting rid of the submethods loop.
llvm-svn: 90535
2009-12-04 03:52:52 +00:00
Anders Carlsson f2f31f4371 Remove an unused member variable.
llvm-svn: 90534
2009-12-04 03:46:21 +00:00
Anders Carlsson e609636e0d Add a way to get the index of a method. Assert that we have the same index for now.
llvm-svn: 90533
2009-12-04 03:41:37 +00:00
Anders Carlsson b07567c315 Add a premature optimization.
llvm-svn: 90532
2009-12-04 03:07:26 +00:00
Anders Carlsson 50f147460a Add the method directly to the vtable.
llvm-svn: 90531
2009-12-04 03:06:03 +00:00
Anders Carlsson 79bce40365 Get rid of the PureVirtualMethods map.
llvm-svn: 90530
2009-12-04 02:58:12 +00:00
Anders Carlsson ddf42c8d80 Move handling of pure virtual methods to AppendMethods (and rename it to AppendMethodsToVtable).
llvm-svn: 90529
2009-12-04 02:56:03 +00:00
Anders Carlsson 5b3ea9bf1c Move covariant thunk handling to AppendMethods too.
llvm-svn: 90528
2009-12-04 02:52:22 +00:00
Anders Carlsson 86809cd8ab Move 'this' pointer adjustment thunks to AppendMethods.
llvm-svn: 90527
2009-12-04 02:43:50 +00:00
Eli Friedman 4b1942cb8b Make functions returning a struct indirectly evaluate the returned struct
directly into the sret pointer. This is an optimization in C, but is required
for correctness in C++ for classes with a non-trivial copy constructor.

llvm-svn: 90526
2009-12-04 02:43:40 +00:00
Anders Carlsson 495634e5ac Factor appending methods to a vtable out into a separate function.
llvm-svn: 90525
2009-12-04 02:39:04 +00:00
Anders Carlsson 4c837d258f Get rid of the Thunks struct too.
llvm-svn: 90524
2009-12-04 02:26:15 +00:00
Anders Carlsson c521f952d6 Remove the CovariantThunk struct.
llvm-svn: 90523
2009-12-04 02:22:02 +00:00
Anders Carlsson 597c776c41 Remove the GlobalDecl from the Thunk as well.
llvm-svn: 90522
2009-12-04 02:14:12 +00:00
Anders Carlsson 8c889abc1a Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.
llvm-svn: 90519
2009-12-04 02:11:21 +00:00
Anders Carlsson cdf1898086 Start populating the VtableMembers structure.
llvm-svn: 90517
2009-12-04 02:08:24 +00:00
Anders Carlsson a84b6e85f0 Add a data structure for efficient storing of vtable methods. Not used yet.
llvm-svn: 90515
2009-12-04 02:01:07 +00:00
Mike Stump 114ab9f695 Fixup reference binding for catch parameters.
Fixup throws and rethrows to use invoke as appropriate.

llvm-svn: 90513
2009-12-04 01:51:45 +00:00
Eli Friedman 6d11ec8cb8 Update chunk of #if 0'ed code to remove fixed FIXME and make it compile. We
probably want to do some sort of performance assessment before enabling it,
though.

llvm-svn: 90510
2009-12-04 01:30:56 +00:00
Mike Stump 5f141b75f9 These are done.
llvm-svn: 90494
2009-12-03 22:55:42 +00:00
Mike Stump 7398ff0f07 Improve catch parameter bindings for scalar non-pointers. WIP.
llvm-svn: 90492
2009-12-03 22:38:15 +00:00
Anders Carlsson ce2cd01647 Handle static_assert inside functions.
llvm-svn: 90461
2009-12-03 17:26:31 +00:00
Mike Stump cdeb800152 Eli, I copied my code from this code... Let's fix the souce of the bad idea!
Thanks.

llvm-svn: 90458
2009-12-03 16:55:20 +00:00
Eli Friedman c339081c24 Fix for PR5659: correct a rather nasty oversight in the type conversion for
member pointer types.

llvm-svn: 90450
2009-12-03 12:44:31 +00:00
Daniel Dunbar 7230fa5630 Convert ABIArgInfo::dump to raw_ostream.
llvm-svn: 90440
2009-12-03 09:13:49 +00:00
Anders Carlsson c6089fda20 Attempt to fix the MSVC build.
llvm-svn: 90427
2009-12-03 07:30:40 +00:00
Eli Friedman 4039f35344 Fix thunk generation for thunks with a parameter with reference type.
llvm-svn: 90412
2009-12-03 04:49:52 +00:00
Eli Friedman 551fe84d0e Minor cleanup.
llvm-svn: 90411
2009-12-03 04:27:05 +00:00