#include "CoverageReport.h"
#include "RenderingSupport.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Support/Threading.h"
#include <numeric>
usingnamespacellvm;
namespace {
struct Column { … };
raw_ostream &operator<<(raw_ostream &OS, const Column &Value) { … }
Column column(StringRef Str, unsigned Width) { … }
template <typename T>
Column column(StringRef Str, unsigned Width, const T &Value) { … }
size_t FileReportColumns[] = …;
size_t FunctionReportColumns[] = …;
void adjustColumnWidths(ArrayRef<StringRef> Files,
ArrayRef<StringRef> Functions) { … }
void renderDivider(raw_ostream &OS, const CoverageViewOptions &Options, bool isFileReport) { … }
template <typename T>
raw_ostream::Colors determineCoveragePercentageColor(const T &Info) { … }
unsigned getNumRedundantPathComponents(ArrayRef<std::string> Paths) { … }
unsigned getRedundantPrefixLen(ArrayRef<std::string> Paths) { … }
unsigned getRedundantPrefixLen(ArrayRef<StringRef> Paths, unsigned LCP) { … }
}
namespace llvm {
void CoverageReport::render(const FileCoverageSummary &File,
raw_ostream &OS) const { … }
void CoverageReport::render(const FunctionCoverageSummary &Function,
const DemangleCache &DC,
raw_ostream &OS) const { … }
void CoverageReport::renderFunctionReports(ArrayRef<std::string> Files,
const DemangleCache &DC,
raw_ostream &OS) { … }
void CoverageReport::prepareSingleFileReport(const StringRef Filename,
const coverage::CoverageMapping *Coverage,
const CoverageViewOptions &Options, const unsigned LCP,
FileCoverageSummary *FileReport, const CoverageFilter *Filters) { … }
std::vector<FileCoverageSummary> CoverageReport::prepareFileReports(
const coverage::CoverageMapping &Coverage, FileCoverageSummary &Totals,
ArrayRef<std::string> Files, const CoverageViewOptions &Options,
const CoverageFilter &Filters) { … }
void CoverageReport::renderFileReports(
raw_ostream &OS, const CoverageFilters &IgnoreFilenameFilters) const { … }
void CoverageReport::renderFileReports(
raw_ostream &OS, ArrayRef<std::string> Files) const { … }
void CoverageReport::renderFileReports(
raw_ostream &OS, ArrayRef<std::string> Files,
const CoverageFiltersMatchAll &Filters) const { … }
void CoverageReport::renderFileReports(
raw_ostream &OS, const std::vector<FileCoverageSummary> &FileReports,
const FileCoverageSummary &Totals, bool ShowEmptyFiles) const { … }
Expected<FileCoverageSummary> DirectoryCoverageReport::prepareDirectoryReports(
ArrayRef<std::string> SourceFiles) { … }
Error DirectoryCoverageReport::prepareSubDirectoryReports(
const ArrayRef<StringRef> &Files, FileCoverageSummary *Totals) { … }
}