Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ CHECK-SAME: "mcdc":{"count":0,"covered":0,"notcovered":0,"percent":0},
CHECK-SAME: "regions":{"count":1,"covered":1,"notcovered":0,"percent":100}}}
CHECK-SAME: ],
CHECK-SAME: "type":"llvm.coverage.json.export"
CHECK-SAME: "version":"3.0.0"
CHECK-SAME: "version":"3.0.1"
8 changes: 4 additions & 4 deletions llvm/test/tools/llvm-cov/mcdc-export-json.test
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// RUN: llvm-profdata merge %S/Inputs/mcdc-general.proftext -o %t.profdata
// RUN: llvm-cov export --format=text %S/Inputs/mcdc-general.o -instr-profile %t.profdata | FileCheck %s

// CHECK: 12,7,12,27,2,4,0,5,[true,true,true,true]
// CHECK: 15,7,15,13,1,2,0,5,[true,true]
// CHECK: 15,19,15,25,1,1,0,5,[true,false]
// CHECK: 18,7,19,15,1,3,0,5,[true,true,false,true]
// CHECK: 12,7,12,27,2,4,0,0,5,[true,true,true,true]
// CHECK: 15,7,15,13,1,2,0,0,5,[true,true]
// CHECK: 15,19,15,25,1,1,0,0,5,[true,false]
// CHECK: 18,7,19,15,1,3,0,0,5,[true,true,false,true]
// CHECK: "mcdc":{"count":12,"covered":10,"notcovered":2,"percent":83.333333333333343}

Instructions for regenerating the test:
Expand Down
4 changes: 2 additions & 2 deletions llvm/tools/llvm-cov/CoverageExporterJson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#include <utility>

/// The semantic version combined as a string.
#define LLVM_COVERAGE_EXPORT_JSON_STR "3.0.0"
#define LLVM_COVERAGE_EXPORT_JSON_STR "3.0.1"

/// Unique type identifier for JSON coverage export.
#define LLVM_COVERAGE_EXPORT_JSON_TYPE_STR "llvm.coverage.json.export"
Expand Down Expand Up @@ -113,7 +113,7 @@ json::Array renderMCDCRecord(const coverage::MCDCRecord &Record) {
const auto [TrueDecisions, FalseDecisions] = Record.getDecisions();
return json::Array({CMR.LineStart, CMR.ColumnStart, CMR.LineEnd,
CMR.ColumnEnd, TrueDecisions, FalseDecisions,
CMR.ExpandedFileID, int64_t(CMR.Kind),
CMR.FileID, CMR.ExpandedFileID, int64_t(CMR.Kind),
gatherConditions(Record)});
}

Expand Down