[PATCH] D93497: Salvage debug info for function arguments in coro-split funclets.

Yifeng Dong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 21:13:26 PST 2021


dongAxis1944 added a comment.

yes, clang will emit parameters of coroutine twice. but i do not know why. so i use the patch to avoid this: https://reviews.llvm.org/D94388

In D93497#2491823 <https://reviews.llvm.org/D93497#2491823>, @aprantl wrote:

> Thanks, I can reproduce the the issue! However, it looks like it reproduces even without my patch. The frontend (or perhaps CoroSplit?) apparently insert both a "t" function argument and a "t"  local variable in the same scope:
>
>   (lldb) b CoroCloner::create()
>   (lldb) r
>   (lldb) p OrigF.getParent()->dump();
>   ...
>   !1957 = !DILocalVariable(name: "t", arg: 2, scope: !1948, file: !883, line: 30, type: !1954)
>   ...
>   !1965 = !DILocalVariable(name: "t", scope: !1948, type: !1954, flags: DIFlagArtificial)
>
> It's seems just that with my patch both variables survive and show up in DWARF.




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93497/new/

https://reviews.llvm.org/D93497



More information about the llvm-commits mailing list