#include "SourceCoverageViewText.h"
#include "CoverageReport.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/Path.h"
#include <optional>
usingnamespacellvm;
Expected<CoveragePrinter::OwnedStream>
CoveragePrinterText::createViewFile(StringRef Path, bool InToplevel) { … }
void CoveragePrinterText::closeViewFile(OwnedStream OS) { … }
Error CoveragePrinterText::createIndexFile(
ArrayRef<std::string> SourceFiles, const CoverageMapping &Coverage,
const CoverageFiltersMatchAll &Filters) { … }
struct CoveragePrinterTextDirectory::Reporter : public DirectoryCoverageReport { … };
Error CoveragePrinterTextDirectory::createIndexFile(
ArrayRef<std::string> SourceFiles, const CoverageMapping &Coverage,
const CoverageFiltersMatchAll &Filters) { … }
namespace {
static const unsigned LineCoverageColumnWidth = …;
static const unsigned LineNumberColumnWidth = …;
unsigned getCombinedColumnWidth(const CoverageViewOptions &Opts) { … }
unsigned getDividerWidth(const CoverageViewOptions &Opts) { … }
}
void SourceCoverageViewText::renderViewHeader(raw_ostream &) { … }
void SourceCoverageViewText::renderViewFooter(raw_ostream &) { … }
void SourceCoverageViewText::renderSourceName(raw_ostream &OS, bool WholeFile) { … }
void SourceCoverageViewText::renderLinePrefix(raw_ostream &OS,
unsigned ViewDepth) { … }
void SourceCoverageViewText::renderLineSuffix(raw_ostream &, unsigned) { … }
void SourceCoverageViewText::renderViewDivider(raw_ostream &OS,
unsigned ViewDepth) { … }
void SourceCoverageViewText::renderLine(raw_ostream &OS, LineRef L,
const LineCoverageStats &LCS,
unsigned ExpansionCol,
unsigned ViewDepth) { … }
void SourceCoverageViewText::renderLineCoverageColumn(
raw_ostream &OS, const LineCoverageStats &Line) { … }
void SourceCoverageViewText::renderLineNumberColumn(raw_ostream &OS,
unsigned LineNo) { … }
void SourceCoverageViewText::renderRegionMarkers(raw_ostream &OS,
const LineCoverageStats &Line,
unsigned ViewDepth) { … }
void SourceCoverageViewText::renderExpansionSite(raw_ostream &OS, LineRef L,
const LineCoverageStats &LCS,
unsigned ExpansionCol,
unsigned ViewDepth) { … }
void SourceCoverageViewText::renderExpansionView(raw_ostream &OS,
ExpansionView &ESV,
unsigned ViewDepth) { … }
void SourceCoverageViewText::renderBranchView(raw_ostream &OS, BranchView &BRV,
unsigned ViewDepth) { … }
void SourceCoverageViewText::renderMCDCView(raw_ostream &OS, MCDCView &MRV,
unsigned ViewDepth) { … }
void SourceCoverageViewText::renderInstantiationView(raw_ostream &OS,
InstantiationView &ISV,
unsigned ViewDepth) { … }
void SourceCoverageViewText::renderTitle(raw_ostream &OS, StringRef Title) { … }
void SourceCoverageViewText::renderTableHeader(raw_ostream &, unsigned) { … }