[clang] [llvm] [coroutine] Implement llvm.coro.await.suspend intrinsic (PR #79712)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 17 19:53:13 PST 2024


================
@@ -338,6 +414,71 @@ static QualType getCoroutineSuspendExprReturnType(const ASTContext &Ctx,
 }
 #endif
 
+llvm::Function *
+CodeGenFunction::generateAwaitSuspendWrapper(Twine const &CoroName,
+                                             Twine const &SuspendPointName,
+                                             CoroutineSuspendExpr const &S) {
+  std::string FuncName = "__await_suspend_wrapper_";
+  FuncName += CoroName.str();
+  FuncName += '_';
+  FuncName += SuspendPointName.str();
----------------
ChuanqiXu9 wrote:

I feel it is better to concat the name of the awaiter instead of the coroutines and suspend number.

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


More information about the cfe-commits mailing list