[PATCH] [ms-cxxabi] Destroy temporary record arguments in the callee

Reid Kleckner rnk at google.com
Thu Jun 6 13:49:54 PDT 2013


On Thu, Jun 6, 2013 at 4:28 PM, Reid Kleckner <rnk at google.com> wrote:

> On Thu, Jun 6, 2013 at 4:06 PM, John McCall <rjmccall at apple.com> wrote:
>
>>
>> These tricks with externally-destructed aren't really suffiicient;  you
>> need to
>> push an EH-only cleanup for the object and then disable it when the call
>> occurs.
>>
>
> So, something like, take a stable iterator to the cleanup stack, emit the
> args, then delete any unnecessary cleanups?  I can't think of an easy way
> to identify which cleanups were passed to args and which were not.
>

Nevermind, that didn't make sense, I didn't really parse the EH-only
cleanup part.  We need to ensure this is cleaned up on unwind.  Makes sense.


>
>> The appropriate solution here is not to propagate IsExternallyDestructed
>> through umpteen layers of API; you'll need to check for this case
>> specifically
>> when emitting an argument and do all the appropriate management.
>
>
> I am doing the check in CodeGenFunction::EmitCallArg().  Maybe I should be
> propagating a bool InArgumentContext or something instead?
>

Given that EmitCallArg() calls through umpteen layers of API, what's the
alternative to wiring a parameter through all those layers?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130606/3f2f7104/attachment.html>


More information about the cfe-commits mailing list