[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
       
    Thu Jan 13 01:12:52 PST 2022
    
    
  
ChuanqiXu added inline comments.
================
Comment at: clang/lib/CodeGen/CGCoroutine.cpp:481-485
-  // The gro variable has to outlive coroutine frame and coroutine promise, but,
-  // it can only be initialized after coroutine promise was created, thus, we
-  // split its emission in two parts. EmitGroAlloca emits an alloca and sets up
-  // cleanups. Later when coroutine promise is available we initialize the gro
-  // and sets the flag that the cleanup is now active.
----------------
Since we've deleted the gro variable, we could remove GetReturnObjectManager.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117087/new/
https://reviews.llvm.org/D117087
    
    
More information about the cfe-commits
mailing list