[llvm-cov] Use less space to describe source names
In r279628, we made SourceCoverageView list the binary associated with a
view and started adding labels (e.g "Source: foo" or "Function: bar") to
everything. Condense this information a bit to unclutter reports.
llvm-svn: 280896
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
index 52e594f..ca3f350 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
@@ -341,12 +341,10 @@
void SourceCoverageViewHTML::renderSourceName(raw_ostream &OS, bool WholeFile,
unsigned FirstUncoveredLineNo) {
OS << BeginSourceNameDiv;
- // Render the source name for the view.
- OS << tag("pre", escape(getNativeSourceName(), getOptions()));
+ std::string ViewInfo = escape(
+ WholeFile ? getVerboseSourceName() : getSourceName(), getOptions());
+ OS << tag("pre", ViewInfo);
if (WholeFile) {
- // Render the object file name for the view.
- OS << tag("pre",
- escape("Binary: " + getOptions().ObjectFilename, getOptions()));
// Render the "Go to first unexecuted line" link for the view.
if (FirstUncoveredLineNo != 0) { // The file is not fully covered
std::string LinkText =