[llvm] [llvm-readobj][COFF] Add `--coff-output-style` flag (PR #95074)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 14:42:50 PDT 2024


MaskRay wrote:

Yes, `--output-style` has been discussed a few times now (e.g. when `JSON` was added https://reviews.llvm.org/D114225).

While `startLine << '\n'` is compatible with the JSON output style, most explicit `startLine` calls are not and need porting.

One interesting question is whether we should print an error when a printXXX hasn't been ported yet. I wish we had the mechanism but it seems quite difficult to implement.
For example, we could buffer the output and parse the output as JSON, and if it fails, report that `opts::UnwindInfo` isn't compatible with JSON, but some mechanism is needed to convert the variable name to the option name.

https://github.com/llvm/llvm-project/pull/95074


More information about the llvm-commits mailing list