[PATCH] D117087: [C++20] [Coroutines] Implement return value optimization for get_return_object
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 15 01:24:24 PST 2022
ChuanqiXu added inline comments.
================
Comment at: clang/lib/CodeGen/CGCoroutine.cpp:650
- if (Stmt *Ret = S.getReturnStmt())
+ if (Stmt *Ret = S.getReturnStmt()) {
+ // Since we already emitted the return value above, so we shouldn't
----------------
junparser wrote:
> can we just remove this?
We couldn't. Otherwise it would emit the return expression again.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117087/new/
https://reviews.llvm.org/D117087
More information about the cfe-commits
mailing list