Skip generating DWARF info for dead code#3498
Conversation
| } | ||
|
|
||
| if is_dead_code(entry) { | ||
| skip_children = true; |
There was a problem hiding this comment.
I'm not personally really all that familiar with this code, but it seems to me like skip_children should be reset back to false at some point after all children have been skipped?
There was a problem hiding this comment.
Ugh, of course. I'll fix that and update the test to make sure it's done properly.
33a83b0 to
2ee62ab
Compare
alexcrichton
left a comment
There was a problem hiding this comment.
Reading over this some more it appears that the depth_delta and skip_at_depth variables are used as an alternative form of skipping here? Is that something where these two methods of skipping can get unified into one which uses next_sibling and/or next_dfs?
2ee62ab to
08e55fd
Compare
Yeah good point. Looking at |
08e55fd to
dde0d01
Compare
When encountering a subprogram that is dead code (as indicated by the dead code proposal https://dwarfstd.org/ShowIssue.php?issue=200609.1), don't generate debug output for the subprogram or any of its children.
dde0d01 to
221fe7d
Compare
|
Thanks! |
When encountering a subprogram that is dead code (as indicated by the dead code proposal https://dwarfstd.org/ShowIssue.php?issue=200609.1), don't generate debug output for the subprogram or any of its children.
Here's an attempt at fixing #3403
When encountering a subprogram that is dead code (as indicated by the
dead code proposal
https://dwarfstd.org/ShowIssue.php?issue=200609.1), don't generate debug
output for the subprogram or any of its children.