From 37f692d19ce5a33daf6b8755a90e3c834239a966 Mon Sep 17 00:00:00 2001 From: Wentao Zhang Date: Tue, 2 Jul 2024 23:05:06 -0500 Subject: [PATCH] ci: remove one LLVM patch as it's already in upstream --- ci/3_get_llvm.sh | 72 ------------------------------------------------ 1 file changed, 72 deletions(-) diff --git a/ci/3_get_llvm.sh b/ci/3_get_llvm.sh index c2c0863..cdf3262 100755 --- a/ci/3_get_llvm.sh +++ b/ci/3_get_llvm.sh @@ -4,78 +4,6 @@ cd $MCDC_HOME/llvm-project # Patches that improve llvm-cov text output -cat > /tmp/llvm_cov_divider.patch << EOF -diff --git a/llvm/tools/llvm-cov/CoverageReport.cpp b/llvm/tools/llvm-cov/CoverageReport.cpp -index 49a35f2a9..00aea4039 100644 ---- a/llvm/tools/llvm-cov/CoverageReport.cpp -+++ b/llvm/tools/llvm-cov/CoverageReport.cpp -@@ -102,8 +102,25 @@ void adjustColumnWidths(ArrayRef Files, - - /// Prints a horizontal divider long enough to cover the given column - /// widths. --void renderDivider(ArrayRef ColumnWidths, raw_ostream &OS) { -- size_t Length = std::accumulate(ColumnWidths.begin(), ColumnWidths.end(), 0); -+void renderDivider(raw_ostream &OS, const CoverageViewOptions &Options, bool isFileReport) { -+ size_t Length; -+ if (isFileReport) { -+ Length = std::accumulate(std::begin(FileReportColumns), std::end(FileReportColumns), 0); -+ if (!Options.ShowRegionSummary) -+ Length -= (FileReportColumns[1] + FileReportColumns[2] + FileReportColumns[3]); -+ if (!Options.ShowInstantiationSummary) -+ Length -= (FileReportColumns[7] + FileReportColumns[8] + FileReportColumns[9]); -+ if (!Options.ShowBranchSummary) -+ Length -= (FileReportColumns[13] + FileReportColumns[14] + FileReportColumns[15]); -+ if (!Options.ShowMCDCSummary) -+ Length -= (FileReportColumns[16] + FileReportColumns[17] + FileReportColumns[18]); -+ } else { -+ Length = std::accumulate(std::begin(FunctionReportColumns), std::end(FunctionReportColumns), 0); -+ if (!Options.ShowBranchSummary) -+ Length -= (FunctionReportColumns[7] + FunctionReportColumns[8] + FunctionReportColumns[9]); -+ if (!Options.ShowMCDCSummary) -+ Length -= (FunctionReportColumns[10] + FunctionReportColumns[11] + FunctionReportColumns[12]); -+ } - for (size_t I = 0; I < Length; ++I) - OS << '-'; - } -@@ -405,7 +422,7 @@ void CoverageReport::renderFunctionReports(ArrayRef Files, - << column("Miss", FunctionReportColumns[11], Column::RightAlignment) - << column("Cover", FunctionReportColumns[12], Column::RightAlignment); - OS << "\n"; -- renderDivider(FunctionReportColumns, OS); -+ renderDivider(OS, Options, false); - OS << "\n"; - FunctionCoverageSummary Totals("TOTAL"); - for (const auto &F : Functions) { -@@ -418,7 +435,7 @@ void CoverageReport::renderFunctionReports(ArrayRef Files, - render(Function, DC, OS); - } - if (Totals.ExecutionCount) { -- renderDivider(FunctionReportColumns, OS); -+ renderDivider(OS, Options, false); - OS << "\n"; - render(Totals, DC, OS); - } -@@ -544,7 +561,7 @@ void CoverageReport::renderFileReports( - Column::RightAlignment) - << column("Cover", FileReportColumns[18], Column::RightAlignment); - OS << "\n"; -- renderDivider(FileReportColumns, OS); -+ renderDivider(OS, Options, true); - OS << "\n"; - - std::vector EmptyFiles; -@@ -563,7 +580,7 @@ void CoverageReport::renderFileReports( - render(*FCS, OS); - } - -- renderDivider(FileReportColumns, OS); -+ renderDivider(OS, Options, true); - OS << "\n"; - render(Totals, OS); - } - -EOF -git apply /tmp/llvm_cov_divider.patch cat > /tmp/llvm_cov_final_new_line.patch << EOF diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp index cab60c2d9..2aa588e6d 100644