Details
- Reviewers
kristina jhenderson grimar jakehehrlich rupprecht rafauler - Commits
- rG0f4367714be7: Revert "Revert "[llvm-objdump] Allow short options without arguments to be…
rL354375: Revert "Revert "[llvm-objdump] Allow short options without arguments to be…
rG77e1f27476c8: [llvm-objdump] Allow short options without arguments to be grouped
rL353998: [llvm-objdump] Allow short options without arguments to be grouped
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 28123 Build 28122: arc lint + arc unit
Event Timeline
llvm/tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
110 | This conflicts with -d and -f when grouped args are allowed | |
200 | I'm very much interested in this being supported (i.e. I've seen objdump -sj.foo as mentioned in the bug), but according to http://llvm.org/docs/CommandLine.html#grouping, grouped args can't take values. |
llvm/tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
110 | Yep, it should be fine to rename it to "disassemble-functions" or something equally reasonable. You'll have to update test/tools/llvm-objdump/X86/disasm-specific-funcs.test. |
llvm/tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
110 | Sounds good. I'll add that to the patch. |
- Don't allow options that take arguments to be grouped.
- Rename df to disassemble-functions.
I think you can still add tests for the other options, e.g. test/tools/llvm-objdump/X86/macho-disassembly-g-dsym.test tests -d -g, so you could add another run statement to that test with -dg and use cmp to verify it produces the same thing
llvm/test/tools/llvm-objdump/option-grouping.test | ||
---|---|---|
2 | This should also verify it produces the same output as -a -f -x -z |
- Add grouped cases to tests that use more than one short switch.
- Compare output with ungrouped variant directly in option grouping test.
Just a couple comments, but feel free to commit once those are fixed. Thanks!
llvm/test/tools/llvm-objdump/AArch64/macho-fat-arm-disasm.test | ||
---|---|---|
2 ↗ | (On Diff #187029) | These should use cmp to verify the files are identical, instead of just checking they match the same patterns |
llvm/test/tools/llvm-objdump/option-grouping.test | ||
2 | Instead of tee, the standard way of doing this is to pass the file via FileCheck --input-file, e.g. |
Before relanding this @ormris, it's probably worth getting @rafauler to confirm he's okay with the option name change, as he was the original one to add it. I've added him as a reviewer. Personally, I think the justification is good, but if it is going to cause horrendous pain, perhaps we should consider alternatives?
This should also verify it produces the same output as -a -f -x -z