-o is in the documentation, but not in the llvm-dwarfdump help text. This patch adds it by inverting the -o and --out-file aliasing. It also removes --out-file from the help text, since we don't really want people to be using this switch in practice.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I'm mildly against this change. IIRC, the idea was that --out-file is a long-form option that nobody uses in practice and we wanted people to prefer -o instead, which is what people are most familiar with working with compilers. So if -o shows up in the --help output, I'd leave it at that.
Just checked clang, and its documentation and help text both mention '-o' and not '--out-file' or another equivalent long-form. I'm happy to change this to expose the '-o' option and replace '--out-file' in the documentation with '-o', if you think that's wise? I don't think we want inconsistency between the help text and documentation.
Not any more, I'm afraid :-)
Once an option is out there we will no doubt get complaints that we broke somebody's scripts if we remove it.
(I'd be in favor of removing it, if it doesn't serve much purpose - does anyone know the history of why it was added?)
We've changed the behavior of llvm-dwarfdump pretty significantly over the years (these days it prints with coloured output, only dumping debug_info by default, and in non-verbose mode (skipping forms and other things)) - it's a fairly "compiler/debugger developer centric tool" which is a small enough audience we've been pretty comfortable making usability improvements even if they'd break some kind of compatibility.
dwarfdump(-classic) on macOS also supported the --out-file option and on macOS we strive for compatibility with the older tool.