[PATCH] D82314: [RFC][Coroutines] Optimize the lifespan of temporary co_await object
Xun Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 23 10:10:29 PDT 2020
lxfind added a comment.
In D82314#2107910 <https://reviews.llvm.org/D82314#2107910>, @junparser wrote:
> Rather than doing it here, can we build await_resume call expression with MaterializedTemporaryExpr when expand the coawait expression. That's how gcc does.
There doesn't appear to be a way to do that in Clang. It goes from the AST to IR directly, and there needs to be a MaterializedTemporaryExpr to wrap the result of co_await. Could you elaborate on how this might be done in Clang?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82314/new/
https://reviews.llvm.org/D82314
More information about the cfe-commits
mailing list