[PATCH] D68752: [sancov] Use LLVM Support library JSON writer in favor of individual implementation

Douglas Gliner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 18:04:26 PDT 2019


dgg5503 created this revision.
dgg5503 added reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman.
dgg5503 added projects: Sanitizers, LLVM.
Herald added subscribers: dexonsmith, mehdi_amini.

In this diff, I've replaced the individual implementation of `JSONWriter` with `json::OStream` provided by `llvm/Support/JSON.h`.

Important Note: The output format of the JSON is considerably different compared to the original implementation. Important differences include:

- New line for each entry in an array (should make diffs cleaner)
- No space between keys and colon in attributed object entries.
- Attributes with empty strings will now print the attribute name and a quote pair rather than excluding the attribute altogether

Examples of these differences can be seen in the changes to the sancov tests which compare the JSON output.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68752

Files:
  llvm/test/tools/sancov/merge.test
  llvm/test/tools/sancov/symbolize.test
  llvm/test/tools/sancov/symbolize_noskip_dead_files.test
  llvm/tools/sancov/sancov.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68752.224214.patch
Type: text/x-patch
Size: 14977 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191010/db125066/attachment.bin>


More information about the llvm-commits mailing list