-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[DWARFLinker] Handle empty sequences when processing DW_AT_LLVM_stmt_sequence
attributes
#132875
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+144 Bytes
(100%)
llvm/test/tools/dsymutil/Inputs/private/tmp/stmt_seq/stmt_seq_macho.exe
Binary file not shown.
Binary file modified
BIN
+1.29 KB
(140%)
llvm/test/tools/dsymutil/Inputs/private/tmp/stmt_seq/stmt_seq_macho.o
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should avoid checking in binary files by using
llvm/utils/update_test_body.py
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.
For the DWARF linker - this is how all tests are currently: https://github.com/llvm/llvm-project/tree/main/llvm/test/tools/dsymutil/Inputs
So I just followed the existing pattern.
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.
Actually I just realized
llvm/utils/update_test_body.py
won't avoid checking in the binaries. But it does provide a standard way to generate these binaries. We should set a good example of using this new tool instead of ad hoc scripts.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.
I think there are 3 main approaches here:
update_test_body.py
approach and instead of checking in binaries, check in the.yaml
of the binary. (Example).update_test_body.py
to generate the binaries to check in (I don't think there is currently any test using this method).For this small fix I went with #1 but I am OK to change it to be either way. I'll let @JDevlieghere as the code owner to decide which approach is preferable.
Uh oh!
There was an error while loading. Please reload this page.
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.
I wasn't aware of
update_test_body.py
and I haven't tried it to generate Mach-Os for dsymutil test, but I'm happy to go with a standardized approach as I agree that the current ad-hoc approach is rather painful.My preferred approach would be to use yaml for the object files (with yaml2obj) and for the debug map (which you can dump with
dsymutil
). I think that's the most readable/auditable, but it's also a pain to do by hand. Maybe the sweet spot is to have a script similar toupdate_test_body.py
specifically for the DWARF linker?Anyway, for this PR I think it's fine to stick with (1) as that's the established way of doing this while we settle on how to go forward. I always (try to) include instructions and source code to regenerate the test so maybe we can use some of the existing ones to test the approach, but that's definitely outside the scope of this PR.