]> granicus.if.org Git - llvm/commit
[sancov] Use LLVM Support library JSON writer in favor of individual implementation
authorVitaly Buka <vitalybuka@google.com>
Sat, 12 Oct 2019 02:29:24 +0000 (02:29 +0000)
committerVitaly Buka <vitalybuka@google.com>
Sat, 12 Oct 2019 02:29:24 +0000 (02:29 +0000)
commit6dcc8f11e9bf92113e354c9f6b1ef622034dc761
tree905bfdbfa4b70d86ef331f7b98d9fa94076b7610
parent015120935a820b6952bcdca8b974aae84c8dbd27
[sancov] Use LLVM Support library JSON writer in favor of individual implementation

Summary:
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.

Patch by Douglas Gliner.

Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman

Subscribers: mehdi_amini, dexonsmith, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D68752

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374628 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/sancov/merge.test
test/tools/sancov/symbolize.test
test/tools/sancov/symbolize_noskip_dead_files.test
tools/sancov/sancov.cpp