================ @@ -777,6 +777,12 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { // LLVM require the frontend to mark the coroutine. CurFn->setPresplitCoroutine(); + + { + CXXRecordDecl *RD = FnRetTy->getAsCXXRecordDecl(); + if (RD && RD->hasAttr<CoroOnlyDestroyWhenCompleteAttr>()) + CurFn->setCoroDestroyOnlyWhenDone(); + } ---------------- ChuanqiXu9 wrote:
Got it. Thanks. Will do in the next round or landing. https://github.com/llvm/llvm-project/pull/71014 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits