]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++, coroutines: Tidy up awaiter variable checks.
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 22 Aug 2024 07:10:14 +0000 (08:10 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sat, 24 Aug 2024 18:39:05 +0000 (19:39 +0100)
commit47dbd69b1b31d34e28bf617d7991e6ad6a8bb957
treee8918c0f183b5b9fd22918094541e2cbbf6d1bf5
parent1d09ccc4a5fe7c9a3dd37fcef34c1523a5c95819
c++, coroutines: Tidy up awaiter variable checks.

When we build an await expression, we might need to materialise the awaiter
if it is a prvalue.  This re-implements this using core APIs instead of local
code.

gcc/cp/ChangeLog:

* coroutines.cc (build_co_await): Simplify checks for the cases that
we need to materialise an awaiter.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/coroutines.cc