[PATCH] D96883: Add support for JSON output style to llvm-symbolizer

Alex Orlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 08:57:18 PDT 2021


aorlov marked an inline comment as done.
aorlov added inline comments.


================
Comment at: llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp:271
+  else {
+    json::OStream JOS(OS, Pretty ? 2 : 0);
+    JOS.value(std::move(J));
----------------
jhenderson wrote:
> Did you consider having a single `json::OStream` as a member of the JSONPrinter class, so that it only needs constructing (with the `Pretty` check) in one place?
Note there is no way to reset `json::OStream` context, so we cannot reuse the same instance to print 2 or more objects while processing stdin.
I have moved `json::OStream` to printJSON(json::Value).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96883



More information about the llvm-commits mailing list