diff options
author | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2022-01-10 19:18:33 +0800 |
---|---|---|
committer | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2022-02-16 13:38:00 +0800 |
commit | d30ca5e2e23fe50dcd8d5d602bf7cfc61b4c1561 (patch) | |
tree | 38c7910c57076b06470609d8cbf7451393d50ceb /llvm/lib/Bitstream/Reader/BitstreamReader.cpp | |
parent | 2aed07e96c7a4f777e854fec619842c4289f8fbd (diff) | |
download | llvm-d30ca5e2e23fe50dcd8d5d602bf7cfc61b4c1561.zip llvm-d30ca5e2e23fe50dcd8d5d602bf7cfc61b4c1561.tar.gz llvm-d30ca5e2e23fe50dcd8d5d602bf7cfc61b4c1561.tar.bz2 |
[C++20] [Coroutines] Implement return value optimization for get_return_object
This patch tries to implement RVO for coroutine's return object got from
get_return_object.
From [dcl.fct.def.coroutine]/p7 we could know that the return value of
get_return_object is either a reference or a prvalue. So it makes sense
to do copy elision for the return value. The return object should be
constructed directly into the storage where they would otherwise be
copied/moved to.
Test Plan: folly, check-all
Reviewed By: junparser
Differential revision: https://reviews.llvm.org/D117087
Diffstat (limited to 'llvm/lib/Bitstream/Reader/BitstreamReader.cpp')
0 files changed, 0 insertions, 0 deletions