[PATCH] D94388: [Coroutine][DebugInfo] Enhance the ability of coroutine to debug parameters under O2
JunMa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 14 17:54:33 PST 2021
junparser added a comment.
In D94388#2494294 <https://reviews.llvm.org/D94388#2494294>, @aprantl wrote:
> Do we understand *why* the frontend is emitting the variables twice? If that just a bug in the clang frontend (which would be my first guess) then we should aim at fixing the frontend instead. If the frontend is trying to do something different, I would love to understand what that is.
Hi @aprantl,
According to the standard, coroutine needs to copy parameters (calling constructor) passed to the coroutine function by the original caller into the coroutine frame. So in frontend, we fake local variables for this behavior, that why we see two variables in debuginfo.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94388/new/
https://reviews.llvm.org/D94388
More information about the llvm-commits
mailing list