[cfe-dev] Inlining temporary destructor calls...

Jordan Rose jordan_rose at apple.com
Fri Jun 20 10:17:45 PDT 2014


On Jun 18, 2014, at 9:08 , Manuel Klimek <klimek at google.com> wrote:

> Hi Jordan,
> 
> I've started to look into inlining temporary destructors, but I'm hitting a wall.
> Specifically, I think I fail at finding the right MemRegion in ProcessTemporaryDtor (there is a comment in there, that says we need the region for the VisitCXXDestructor call).
> 
> Any help / pointers / brain-dumps on how to do it would be highly appreciated.

Hm. I haven't thought about it enough to give you a fool-proof plan, but one possibility could be to store the MemRegion in the state at the point of the CXXBindTemporaryExpr, rather than just a boolean flag. I don't quite know what the ramifications of that would be, though.

(By the time we get to the destructor, the value of the CXXBindTemporaryExpr is almost certainly no longer in the Environment.)

Jordan




More information about the cfe-dev mailing list