[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 15:16:44 PDT 2024
MaskRay wrote:
> Thanks for the info @MaskRay ! I've been a bit delayed in opening these as I am still looking into the `spr` workflow to open the stacked PRs.
>
> > While startLine << '\n' is compatible with the JSON output style, most explicit startLine calls are not and need porting.
>
> That's correct. I had to address such cases for this change.
>
> > Yes, --output-style has been discussed a few times now (e.g. when JSON was added [reviews.llvm.org/D114225](https://reviews.llvm.org/D114225)).
>
> I think much like as was mentioned previously (and due to the above) it might make sense to do `--coff-output-style` until potentially all formats add JSON support before moving to `--output-style`. Thoughts?
Perhaps do this: add `--output-style` as a COFF-specific option. If an object file is not COFF, report an error.
If the object file is COFF but requests a JSON-unimplemented dump option, report an error. The feature list can be maintained as an allow list.
In separate discussions, we determine what we will do with ELF, perhaps maintain an allow list for ELF as well. This effort is orthogonal to COFF.
https://github.com/llvm/llvm-project/pull/95074
More information about the llvm-commits
mailing list