[all-commits] [llvm/llvm-project] 5af06b: [Coro][Debuginfo] Add debug info to `__NoopCoro_Re...
Adrian Vogelsgesang via All-commits
all-commits at lists.llvm.org
Fri Aug 26 05:50:31 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5af06ba7dc26f614989a9a9e16e69f6ecc811519
https://github.com/llvm/llvm-project/commit/5af06ba7dc26f614989a9a9e16e69f6ecc811519
Author: Adrian Vogelsgesang <avogelsgesang at salesforce.com>
Date: 2022-08-26 (Fri, 26 Aug 2022)
Changed paths:
M llvm/lib/Transforms/Coroutines/CoroEarly.cpp
R llvm/test/Transforms/Coroutines/coro-early.ll
A llvm/test/Transforms/Coroutines/coro-noop.ll
A llvm/test/Transforms/Coroutines/coro-resume-destroy.ll
Log Message:
-----------
[Coro][Debuginfo] Add debug info to `__NoopCoro_ResumeDestroy` function
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`___lldb_unnamed_symbol211)
destroy = 0x0000555555555c50 (a.out`___lldb_unnamed_symbol211)
}
```
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 `.` was replaced by a `_`, so the name is now a valid identifier
in C, making it allows me to type its name in the debugger
Differential Revision: https://reviews.llvm.org/D132580
More information about the All-commits
mailing list