[PATCH] D132580: [Coro][Debuginfo] Add debug info to `_NoopCoro_ResumeDestroy` function
Adrian Vogelsgesang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 11:11:53 PDT 2022
avogelsgesang created this revision.
avogelsgesang added reviewers: ChuanqiXu, aprantl, dblaikie, ychen.
Herald added a subscriber: hiraditya.
Herald added a project: All.
avogelsgesang requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
With this commit, we now attach an `DISubprogram` to the LLVM-generated
`_NoopCoro_ResumeDestroy` function. Thereby, lldb can show a
`std::coroutine_handle` to a `std::noop_coroutine` as
continuation = coro frame = 0x555555560d98 {
resume = 0x0000555555555c50 (a.out`_NoopCoro_ResumeDestroy)
destroy = 0x0000555555555c50 (a.out`_NoopCoro_ResumeDestroy)
}
instead of
continuation = coro frame = 0x555555560d98 {
resume = 0x0000555555555c50 (a.out`_NoopCoro_ResumeDestroy)
destroy = 0x0000555555555c50 (a.out`_NoopCoro_ResumeDestroy)
}
I renamed the function from `NoopCoro.ResumeDestroy` to
`_NoopCoro_ResumeDestroy` because:
- the leading `_` makes sure this is a reserved name and should not clash with any user-provided names
- the `_` is now a valid identifier in C, making it easier to type its name in the debugger.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132580
Files:
llvm/lib/Transforms/Coroutines/CoroEarly.cpp
llvm/test/Transforms/Coroutines/coro-early.ll
llvm/test/Transforms/Coroutines/coro-noop.ll
llvm/test/Transforms/Coroutines/coro-resume-destroy.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132580.455297.patch
Type: text/x-patch
Size: 4894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220824/d1b465fd/attachment.bin>
More information about the llvm-commits
mailing list