Added support for dumping line number information in llvm-objdump.
Details
- Reviewers
jasonliu shchenz jhenderson jsji Higuoxing MaskRay - Group Reviewers
Restricted Project - Commits
- rG8a23f74eb79f: [llvm-objdump][XCOFF] Enable the -l (--line-numbers) option.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The llvm-objdump test looks good to me. Instead of # REQUIRES: powerpc-registered-target, you can add a lit.local.cfg with if not 'PowerPC' in config.root.targets:\n config.unsupported = True
There seem to be quite a few new code paths added in this patch, and I'm not convinced they are all tested? Please add the necessary testing.
llvm/test/tools/llvm-objdump/XCOFF/print-linenumber.test | ||
---|---|---|
1 | Add a simple comment to the start of this file describing what it is testing. |
It appears that the --line-numbers option can't cover these paths.
I would be very grateful if you have any suggestions for adding tests, or find any examples I can follow. Thanks!
For the parts that aren't required and can't be exercised at all, it seems like you should be able to just leave them out? For those parts that are required, you could add gtest unit testing to cover them. See llvm/unittest/Object for some examples.
The return values of these two hooks do not affect the result of line number. I removed these paths in the patch and will post another patch to implement them.
One nit remaining, otherwise looks good.
llvm/test/tools/llvm-objdump/XCOFF/print-linenumber.test | ||
---|---|---|
1 | Ping this coment. |
LGTM, once my last comment has been addressed.
llvm/test/tools/llvm-objdump/XCOFF/print-linenumber.test | ||
---|---|---|
2 | As per other comments, use ## for the marker. Also, no need to mention llvm-objdump (since we're in the llvm-objdump test directory). |