[PATCH] D76763: Export Segment.IsGapRegion to JSON

Dennis Felsing via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 01:35:33 PDT 2020


def updated this revision to Diff 252766.
def edited the summary of this revision.
def added a comment.

Increased the json export version to 2.0.1, fixed binary-formats.canonical.json


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

https://reviews.llvm.org/D76763

Files:
  llvm/test/tools/llvm-cov/Inputs/binary-formats.canonical.json
  llvm/tools/llvm-cov/CoverageExporterJson.cpp


Index: llvm/tools/llvm-cov/CoverageExporterJson.cpp
===================================================================
--- llvm/tools/llvm-cov/CoverageExporterJson.cpp
+++ llvm/tools/llvm-cov/CoverageExporterJson.cpp
@@ -53,7 +53,7 @@
 #include <utility>
 
 /// The semantic version combined as a string.
-#define LLVM_COVERAGE_EXPORT_JSON_STR "2.0.0"
+#define LLVM_COVERAGE_EXPORT_JSON_STR "2.0.1"
 
 /// Unique type identifier for JSON coverage export.
 #define LLVM_COVERAGE_EXPORT_JSON_TYPE_STR "llvm.coverage.json.export"
@@ -72,8 +72,9 @@
 }
 
 json::Array renderSegment(const coverage::CoverageSegment &Segment) {
-  return json::Array({Segment.Line, Segment.Col, clamp_uint64_to_int64(Segment.Count),
-                      Segment.HasCount, Segment.IsRegionEntry});
+  return json::Array({Segment.Line, Segment.Col,
+                      clamp_uint64_to_int64(Segment.Count), Segment.HasCount,
+                      Segment.IsRegionEntry, Segment.IsGapRegion});
 }
 
 json::Array renderRegion(const coverage::CountedRegion &Region) {
Index: llvm/test/tools/llvm-cov/Inputs/binary-formats.canonical.json
===================================================================
--- llvm/test/tools/llvm-cov/Inputs/binary-formats.canonical.json
+++ llvm/test/tools/llvm-cov/Inputs/binary-formats.canonical.json
@@ -4,8 +4,8 @@
 CHECK-SAME:    {"expansions":[],
 CHECK-SAME:     "filename":"/tmp/binary-formats.c",
 CHECK-SAME:     "segments":
-CHECK-SAME:        4,40,100,true,true
-CHECK-SAME:        4,42,0,false,false
+CHECK-SAME:        4,40,100,true,true,false
+CHECK-SAME:        4,42,0,false,false,false
 CHECK-SAME:     "summary":{"functions":{"count":1,"covered":1,"percent":100},
 CHECK-SAME:                "instantiations":{"count":1,"covered":1,"percent":100},
 CHECK-SAME:                "lines":{"count":1,"covered":1,"percent":100},
@@ -24,4 +24,4 @@
 CHECK-SAME:     "regions":{"count":1,"covered":1,"notcovered":0,"percent":100}}}
 CHECK-SAME: ],
 CHECK-SAME: "type":"llvm.coverage.json.export"
-CHECK-SAME: "version":"2.0.0"
+CHECK-SAME: "version":"2.0.1"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76763.252766.patch
Type: text/x-patch
Size: 2079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200326/3302c6ed/attachment.bin>


More information about the llvm-commits mailing list