llvm/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp

//===- SourceCoverageViewHTML.cpp - A html code coverage view -------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file This file implements the html coverage renderer.
///
//===----------------------------------------------------------------------===//

#include "SourceCoverageViewHTML.h"
#include "CoverageReport.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/ThreadPool.h"
#include <optional>

usingnamespacellvm;

namespace {

// Return a string with the special characters in \p Str escaped.
std::string escape(StringRef Str, const CoverageViewOptions &Opts) {}

// Create a \p Name tag around \p Str, and optionally set its \p ClassName.
std::string tag(StringRef Name, StringRef Str, StringRef ClassName = "") {}

// Create an anchor to \p Link with the label \p Str.
std::string a(StringRef Link, StringRef Str, StringRef TargetName = "") {}

const char *BeginHeader =;

const char *JSForCoverage =;

const char *CSSForCoverage =;

const char *EndHeader =;

const char *BeginCenteredDiv =;

const char *EndCenteredDiv =;

const char *BeginSourceNameDiv =;

const char *EndSourceNameDiv =;

const char *BeginCodeTD =;

const char *EndCodeTD =;

const char *BeginPre =;

const char *EndPre =;

const char *BeginExpansionDiv =;

const char *EndExpansionDiv =;

const char *BeginTable =;

const char *EndTable =;

const char *ProjectTitleTag =;

const char *ReportTitleTag =;

const char *CreatedTimeTag =;

std::string getPathToStyle(StringRef ViewPath) {}

std::string getPathToJavaScript(StringRef ViewPath) {}

void emitPrelude(raw_ostream &OS, const CoverageViewOptions &Opts,
                 const std::string &PathToStyle = "",
                 const std::string &PathToJavaScript = "") {}

void emitTableRow(raw_ostream &OS, const CoverageViewOptions &Opts,
                  const std::string &FirstCol, const FileCoverageSummary &FCS,
                  bool IsTotals) {}

void emitEpilog(raw_ostream &OS) {}

} // anonymous namespace

Expected<CoveragePrinter::OwnedStream>
CoveragePrinterHTML::createViewFile(StringRef Path, bool InToplevel) {}

void CoveragePrinterHTML::closeViewFile(OwnedStream OS) {}

/// Emit column labels for the table in the index.
static void emitColumnLabelsForIndex(raw_ostream &OS,
                                     const CoverageViewOptions &Opts) {}

std::string
CoveragePrinterHTML::buildLinkToFile(StringRef SF,
                                     const FileCoverageSummary &FCS) const {}

Error CoveragePrinterHTML::emitStyleSheet() {}

Error CoveragePrinterHTML::emitJavaScript() {}

void CoveragePrinterHTML::emitReportHeader(raw_ostream &OSRef,
                                           const std::string &Title) {}

/// Render a file coverage summary (\p FCS) in a table row. If \p IsTotals is
/// false, link the summary to \p SF.
void CoveragePrinterHTML::emitFileSummary(raw_ostream &OS, StringRef SF,
                                          const FileCoverageSummary &FCS,
                                          bool IsTotals) const {}

Error CoveragePrinterHTML::createIndexFile(
    ArrayRef<std::string> SourceFiles, const CoverageMapping &Coverage,
    const CoverageFiltersMatchAll &Filters) {}

struct CoveragePrinterHTMLDirectory::Reporter : public DirectoryCoverageReport {};

Error CoveragePrinterHTMLDirectory::createIndexFile(
    ArrayRef<std::string> SourceFiles, const CoverageMapping &Coverage,
    const CoverageFiltersMatchAll &Filters) {}

void SourceCoverageViewHTML::renderViewHeader(raw_ostream &OS) {}

void SourceCoverageViewHTML::renderViewFooter(raw_ostream &OS) {}

void SourceCoverageViewHTML::renderSourceName(raw_ostream &OS, bool WholeFile) {}

void SourceCoverageViewHTML::renderLinePrefix(raw_ostream &OS, unsigned) {}

void SourceCoverageViewHTML::renderLineSuffix(raw_ostream &OS, unsigned) {}

void SourceCoverageViewHTML::renderViewDivider(raw_ostream &, unsigned) {}

void SourceCoverageViewHTML::renderLine(raw_ostream &OS, LineRef L,
                                        const LineCoverageStats &LCS,
                                        unsigned ExpansionCol, unsigned) {}

void SourceCoverageViewHTML::renderLineCoverageColumn(
    raw_ostream &OS, const LineCoverageStats &Line) {}

void SourceCoverageViewHTML::renderLineNumberColumn(raw_ostream &OS,
                                                    unsigned LineNo) {}

void SourceCoverageViewHTML::renderRegionMarkers(raw_ostream &,
                                                 const LineCoverageStats &Line,
                                                 unsigned) {}

void SourceCoverageViewHTML::renderExpansionSite(raw_ostream &OS, LineRef L,
                                                 const LineCoverageStats &LCS,
                                                 unsigned ExpansionCol,
                                                 unsigned ViewDepth) {}

void SourceCoverageViewHTML::renderExpansionView(raw_ostream &OS,
                                                 ExpansionView &ESV,
                                                 unsigned ViewDepth) {}

void SourceCoverageViewHTML::renderBranchView(raw_ostream &OS, BranchView &BRV,
                                              unsigned ViewDepth) {}

void SourceCoverageViewHTML::renderMCDCView(raw_ostream &OS, MCDCView &MRV,
                                            unsigned ViewDepth) {}

void SourceCoverageViewHTML::renderInstantiationView(raw_ostream &OS,
                                                     InstantiationView &ISV,
                                                     unsigned ViewDepth) {}

void SourceCoverageViewHTML::renderTitle(raw_ostream &OS, StringRef Title) {}

void SourceCoverageViewHTML::renderTableHeader(raw_ostream &OS,
                                               unsigned ViewDepth) {}