================
@@ -768,6 +779,41 @@ struct GetReturnObjectManager {
     CGF.EmitAutoVarInit(GroEmission);
     Builder.CreateStore(Builder.getTrue(), GroActiveFlag);
   }
+
+  void EmitGroConv() {
+    // GRO conversion is unnecessary when get_return_object's type matches the
+    // coroutine return type.
+    if (DirectEmit)
+      return;
+
+    auto *InsertPt = Builder.GetInsertBlock();
----------------
NewSigma wrote:

Thanks for the code review. After checking, `InsertPt` serves as the resume 
destination of the `final.exit` block (see comments of `EmitGroConv` for the 
defination of `final.exit`), and `final.exit` itself may not be directly 
accessible. In this revision, I add an assumption that we will fallthrough from 
the `final.exit` block. Not sure if there is a more direct approach.

https://github.com/llvm/llvm-project/pull/151067
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to