[PATCH] D82999: [CodeGen] Check the cleanup flag before destructing lifetime-extended temporaries created in conditional expressions
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 2 14:03:42 PDT 2020
rjmccall added a comment.
In D82999#2129031 <https://reviews.llvm.org/D82999#2129031>, @ahatanak wrote:
> After-full-expression cleanup looks fine to me. `pushCleanupAfterFullExpr` sets the flags and saves the values when it's in a conditional branch.
>
> I think ideally we shouldn't have to clean up anything in the true expression when the false expression throws, but I wasn't able to come up with an easy way to make IRGen avoid that.
It's unavoidable; you can have code after the merge point that can throw, and you can only know dynamically which side you came from at that point.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82999/new/
https://reviews.llvm.org/D82999
More information about the cfe-commits
mailing list