ChuanqiXu added inline comments.

================
Comment at: clang/lib/CodeGen/CGCoroutine.cpp:221
     CGF.EmitBlock(RealSuspendBlock);
+  } else if (ForcestackStart) {
+    Builder.CreateCall(
----------------
ChuanqiXu wrote:
> can we rewrite it into:
> ```
> else if (SuspendRet != nullptr && SuspendRet->getType()->isClassType()) {
>      // generate:
>      // llvm.coro.forcestack(SuspendRet)
> }
> ```
Sorry I find we can't did it directly. As you said, we need to traverse down 
SuspendRet. And I still think we should did it only at CodeGen part since it 
looks not so hard. I guess we could make it in above 10~15 lines of codes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98638/new/

https://reviews.llvm.org/D98638

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to