[clang] [Clang][CodeGen][Coroutines] Make coroutine startup exception-safe (C… (PR #202279)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 23:09:44 PDT 2026


================
@@ -64,6 +64,12 @@ struct clang::CodeGen::CGCoroData {
   // statements jumps to this point after calling return_xxx promise member.
   CodeGenFunction::JumpDest FinalJD;
 
+  // A cleanup flag for the coroutine return value object when it is initialized
+  // directly by the get-return-object invocation. It models the standard's
+  // initial-await-resume-called guard for exceptions thrown during coroutine
+  // startup, before the initial await_resume starts.
+  Address InitialReturnObjectActiveFlag = Address::invalid();
----------------
ChuanqiXu9 wrote:

OK, seems fine to me

https://github.com/llvm/llvm-project/pull/202279


More information about the cfe-commits mailing list