[llvm-cov] Delete the NonCodeLines field, it was always dead
llvm-svn: 281882
diff --git a/llvm/tools/llvm-cov/CoverageExporterJson.cpp b/llvm/tools/llvm-cov/CoverageExporterJson.cpp
index e2a798f..e8dee14 100644
--- a/llvm/tools/llvm-cov/CoverageExporterJson.cpp
+++ b/llvm/tools/llvm-cov/CoverageExporterJson.cpp
@@ -47,17 +47,8 @@
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include <stack>
-/// \brief Major version of the JSON Coverage Export Format.
-#define LLVM_COVERAGE_EXPORT_JSON_MAJOR 1
-
-/// \brief Minor version of the JSON Coverage Export Format.
-#define LLVM_COVERAGE_EXPORT_JSON_MINOR 0
-
-/// \brief Patch version of the JSON Coverage Export Format.
-#define LLVM_COVERAGE_EXPORT_JSON_PATCH 0
-
/// \brief The semantic version combined as a string.
-#define LLVM_COVERAGE_EXPORT_JSON_STR "1.0.0"
+#define LLVM_COVERAGE_EXPORT_JSON_STR "1.1.0"
/// \brief Unique type identifier for JSON coverage export.
#define LLVM_COVERAGE_EXPORT_JSON_TYPE_STR "llvm.coverage.json.export"
@@ -377,7 +368,6 @@
emitDictElement("count", Summary.LineCoverage.NumLines);
emitDictElement("covered", Summary.LineCoverage.Covered);
emitDictElement("percent", Summary.LineCoverage.getPercentCovered());
- emitDictElement("noncode", Summary.LineCoverage.NonCodeLines);
// End Line Coverage Summary.
emitDictEnd();
diff --git a/llvm/tools/llvm-cov/CoverageSummaryInfo.cpp b/llvm/tools/llvm-cov/CoverageSummaryInfo.cpp
index 396cd65..21aa7ff 100644
--- a/llvm/tools/llvm-cov/CoverageSummaryInfo.cpp
+++ b/llvm/tools/llvm-cov/CoverageSummaryInfo.cpp
@@ -67,7 +67,7 @@
return FunctionCoverageSummary(
Function.Name, Function.ExecutionCount,
RegionCoverageInfo(CoveredRegions, NumCodeRegions),
- LineCoverageInfo(CoveredLines, 0, NumLines));
+ LineCoverageInfo(CoveredLines, NumLines));
}
void FunctionCoverageSummary::update(const FunctionCoverageSummary &Summary) {
diff --git a/llvm/tools/llvm-cov/CoverageSummaryInfo.h b/llvm/tools/llvm-cov/CoverageSummaryInfo.h
index acf240d..c04a4d4 100644
--- a/llvm/tools/llvm-cov/CoverageSummaryInfo.h
+++ b/llvm/tools/llvm-cov/CoverageSummaryInfo.h
@@ -61,33 +61,27 @@
/// \brief The number of lines that weren't executed.
size_t NotCovered;
- /// \brief The number of lines that aren't code.
- size_t NonCodeLines;
-
/// \brief The total number of lines in a function/file.
size_t NumLines;
- LineCoverageInfo()
- : Covered(0), NotCovered(0), NonCodeLines(0), NumLines(0) {}
+ LineCoverageInfo() : Covered(0), NotCovered(0), NumLines(0) {}
- LineCoverageInfo(size_t Covered, size_t NumNonCodeLines, size_t NumLines)
- : Covered(Covered), NotCovered(NumLines - NumNonCodeLines - Covered),
- NonCodeLines(NumNonCodeLines), NumLines(NumLines) {}
+ LineCoverageInfo(size_t Covered, size_t NumLines)
+ : Covered(Covered), NotCovered(NumLines - Covered), NumLines(NumLines) {}
LineCoverageInfo &operator+=(const LineCoverageInfo &RHS) {
Covered += RHS.Covered;
NotCovered += RHS.NotCovered;
- NonCodeLines += RHS.NonCodeLines;
NumLines += RHS.NumLines;
return *this;
}
- bool isFullyCovered() const { return Covered == (NumLines - NonCodeLines); }
+ bool isFullyCovered() const { return Covered == NumLines; }
double getPercentCovered() const {
- if (NumLines - NonCodeLines == 0)
+ if (NumLines == 0)
return 0.0;
- return double(Covered) / double(NumLines - NonCodeLines) * 100.0;
+ return double(Covered) / double(NumLines) * 100.0;
}
};