[PATCH] D96289: Add support for YAML output style to llvm-symbolizer

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 17:11:44 PST 2021


dblaikie added a comment.

In D96289#2567701 <https://reviews.llvm.org/D96289#2567701>, @jhenderson wrote:

> In D96289#2566187 <https://reviews.llvm.org/D96289#2566187>, @dblaikie wrote:
>
>> In D96289#2564889 <https://reviews.llvm.org/D96289#2564889>, @jhenderson wrote:
>>
>>> In D96289#2563945 <https://reviews.llvm.org/D96289#2563945>, @MaskRay wrote:
>>>
>>>> The two cover the spectrum I can think of. If really we need an interchange format (I have some doubts, after asking others, so it is not my own opinion), JSON seems a better choice.
>>>
>>> Having given it more thought, +1 to using JSON over YAML. JSON has the advantage that it can be consumed directly by native python, without needing additional modules, and python is a regular choice for people writing scripts to parse output like this.
>>
>> Given we already have YAML APIs in LLVM, there's some convenience/reduced cost (for perhaps an already marginal use case, I'd rather keep the code complexity lower - and this seems pretty low at the moment) to sticking with that, I think? Or is there some equivalently tidy way to emit JSON?
>
> I've not looked too much in detail, but there's JSON.h in the Support library. A casual glance suggests this will have most of what is needed, so using JSON shouldn't be significantly different in terms of additional complexity, compared to using YAML.

Oh, fair enough - I don't mind either way, then.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96289



More information about the llvm-commits mailing list