[PATCH] D111658: Add JSON output skeleton to llvm-readelf

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 9 01:06:01 PST 2021


jhenderson added a comment.

In D111658#3117315 <https://reviews.llvm.org/D111658#3117315>, @Jaysonyan wrote:

> @jhenderson I was wondering if you had any more thoughts on the design on `ScopedPrinter`/ `ScopedPrinterBase`/`JSONScopedPrinter`? As I see it right now, it's not very feasible to treat `ScopedPrinter` and `JSONScopedPrinter` uniformly due to the usage of methods like `startLine()`. So a parent-child structure between `ScopedPrinter` and `JSONScopedPrinter` might not be suitable.

Sorry, I'm a little bit busy, and have a number of other reviews that are calling for my attention too. I haven't had a chance to give this too much further thought yet. One initial thought I had was that things like `printLine` might just be a no-op for JSON output, although I think it might be nicer if we could wrap these sorts of calls behind another interface suitable for generic llvm-readobj usage. Unfortunately, I don't have the time right now to take a look at all usages, to see if there's a way we could represent such functions in a cleaner manner. I'll try to come back to this later this week, or next week, if I can.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111658/new/

https://reviews.llvm.org/D111658



More information about the llvm-commits mailing list