On 2/2/20 9:28 PM, JunMa wrote:
在 2020/2/3 上午9:03, JunMa 写道:
I think all you want here is:
await_expr = convert_from_reference (await_expr);
Thanks, I'll update it.
Regards
JunMa
Hi nathan,
Here is the update.
/* This will produce the value (if one is provided) from the co_await
expression. */
tree resume_call = TREE_VEC_ELT (awaiter_calls, 2); /* await_resume(). */
+ if (TREE_CODE (resume_call) == INDIRECT_REF)
+ /* Sink to await_resume call_expr. */
+ resume_call = TREE_OPERAND (resume_call, 0);
sorry, I should have realized you still needed this bit. This too is
stripping a reference access, right? I.e. TYPE_REF_P (TREE_TYPE
(resume_call)) is true. You should that as the condition too.
the other part of the patch is fine
nathan
--
Nathan Sidwell