-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IRGen][DebugInfo] split method declaration and definition. #67077
Conversation
bd1cc77
to
dc70d2f
Compare
@swift-ci please test |
dc70d2f
to
c2ef03b
Compare
@adrian-prantl Could you help me invoke |
@swift-ci test and merge |
After adding the parameter |
c2ef03b
to
d7d8a8c
Compare
d7d8a8c
to
b00d152
Compare
After this PR, a DWARF in the following format may be generated:
I put b00d1520f89bb7df1d2a3eeee57cae7682755634 to this PR to show on CI that this did work. Opening a new PR should be a better option. #67592 |
I also tried to solve the failure of |
I've reviewed the backtracing change in #67592. TL/DR: It looks fine, though I think I'd like it to check the tag to make sure the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me, modulo my comment about checking the tag.
b00d152
to
3ae5389
Compare
@swift-ci Please test |
I figured out why the |
When the function is a method, we want a DW_AT_declaration there. Because there's no good way to cross the CU boundary to insert a nested DISubprogram definition in one CU into a type defined in another CU when doing LTO builds.
3ae5389
to
81953ef
Compare
Rebase and update code comments. |
@swift-ci test |
@swift-ci test |
When the function is a method, we only want a
DW_AT_declaration
there, because LLVM LTO can't unify type definitions when a child DIE is a
full subprogram definition. Now the subprogram definition gets added at the
CU level with a specification link back to the abstract declaration.
Both GCC and Clang write debuginfo this way for C++ class methods. Now Rust is too.
Related discussions:
Fixes #53940.