[PATCH] [ms-cxxabi] Destroy temporary record arguments in the callee
Reid Kleckner
rnk at google.com
Mon Jun 10 12:58:38 PDT 2013
On Mon, Jun 10, 2013 at 1:29 PM, Richard Smith <richard at metafoo.co.uk>wrote:
>
> You're likely to need a Sema change to ensure that a destructor for the
> parameter type is implicitly declared (if needed) in the TU containing the
> caller (otherwise IR generation will probably crash or assert when trying
> to emit a call to it).
>
I think I solved this with a forthcoming patch.
> You'll presumably also need either a Sema change or a CodeGen change to
> ensure that a definition of the destructor ends up in the program -- either
> mark the dtor as used in the TU containing the callee (which is likely to
> match MSVC but is non-conforming), or demote it from linkonce_odr to
> weak_odr in the TU containing the call (which is conforming but may hinder
> inlining etc).
>
What's wrong with marking the dtor as used? You need a full class
definition to take a class by value, right?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130610/cf92b692/attachment.html>
More information about the cfe-commits
mailing list