================
@@ -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();
----------------
ChuanqiXu9 wrote:

According to the context of the calling point, I can infer that the `InsertPt` 
refers to FinalBB. But this is not straight forward. We can  record FinalBB to 
CurCoroData and read FinalBB directly. This won't be expensive but improve the 
readability much better.

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