[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:15 PST 2024
================
@@ -232,16 +250,74 @@ static LValueOrRValue emitSuspendExpression(CodeGenFunction &CGF, CGCoroData &Co
auto *NullPtr = llvm::ConstantPointerNull::get(CGF.CGM.Int8PtrTy);
auto *SaveCall = Builder.CreateCall(CoroSave, {NullPtr});
+ const auto AwaitSuspendCanThrow =
+ AwaitSuspendStmtCanThrow(S.getSuspendExpr());
+
+ auto SuspendWrapper = CodeGenFunction(CGF.CGM).generateAwaitSuspendWrapper(
+ CGF.CurFn->getName(), Prefix, S);
+
+ llvm::CallBase *SuspendRet = nullptr;
----------------
ChuanqiXu9 wrote:
Let's sink the definitions to the uses.
https://github.com/llvm/llvm-project/pull/79712
More information about the cfe-commits
mailing list