[cfe-commits] [Review] First step towards PR13231 - vftable generation with -cxx-abi microsoft
João Matos
ripzonetriton at gmail.com
Wed Dec 5 06:58:25 PST 2012
I've researched MS ctor/dtor behaviour a bit, check PR 12784 (
http://llvm.org/bugs/show_bug.cgi?id=12784) for a simple file that shows
the different types we will expect.
On Wed, Dec 5, 2012 at 2:28 PM, Timur Iskhodzhanov <timurrrr at google.com>wrote:
> On Tue, Dec 4, 2012 at 8:09 PM, Timur Iskhodzhanov <timurrrr at google.com>
> wrote:
> >>> d) The complete/deleting dtor logic will change when we support MSVC
> >>> dtor types, but not now
> >>> [shouldn't matter now that we still don't support virtual
> inheritance]
> >>
> >> You're thinking about complete vs. base destructors. Complete vs.
> deleting
> >> destructors isn't about virtual inheritance; it's about whether the
> destructor
> >> calls operator delete.
> > Yeah, now I see it... [see below]
> >
> >> (This is important because the 'delete' operator uses
> >> the operator delete from the most-derived class.)
> >>
> >> How does MSVC handle the difference between
> >> foo->~Foo(); // virtually dispatched but doesn't call operator delete
> >> and
> >> delete foo; // virtually dispatched and calls operator delete
> >> ?
> > Clang with my patch behaves badly on such code.
> > It seems to work fine at least on simple code where you don't use
> > virtual destructors.
> >
> > Actually, the whole idea of base vs complete dtors doesn't apply to
> > -cxx-abi microsoft.
> > Anyways, had plans to work on ctor and dtor compatibility as a
> > separate patch - is that OK?
> > I've put a couple of more FIXME into the code for that. (in
> > ::AddMethod and ::ComputeMethodVTableIndices).
>
> Attached is the patch which is similar to bug_13231_2 but puts the
> complete dtor rather than deleting.
> Both are basically broken anyways but at least you can choose what you
> think fits better :)
> Investigating compatible dtor behavior is definitely on my TODO-soon
> list now [as a separate change if this works]
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
--
João Matos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121205/9c79a025/attachment.html>
More information about the cfe-commits
mailing list