[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
This commit is contained in:
Vedant Kumar
2016-09-08 00:56:48 +00:00
parent fa75437183
commit 0053c0b679
9 changed files with 40 additions and 52 deletions

View File

@@ -341,12 +341,10 @@ void SourceCoverageViewHTML::renderViewFooter(raw_ostream &OS) {
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 =