[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 30 18:43:35 PST 2025
================
@@ -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;
----------------
ChuanqiXu9 wrote:
nit: it reads better to move the condition to the caller of the function.
https://github.com/llvm/llvm-project/pull/151067
More information about the cfe-commits
mailing list