[llvm-cov] Add the project summary to each source file coverage report.
This patch includes the following changes:
- Included header "Code coverage report" and include the date that the report was created.
- Included title (as specified in a command line option, (i.e llvm-cov -project-title="Simple Test")
- In the summary, list the elf files that the source code file has contributed to.
- Used column heading for "Line No.", "Count No.", Source".
Differential Revision: https://reviews.llvm.org/D23345
llvm-svn: 279628
diff --git a/llvm/tools/llvm-cov/CoverageViewOptions.h b/llvm/tools/llvm-cov/CoverageViewOptions.h
index 45f2d81..8e85245 100644
--- a/llvm/tools/llvm-cov/CoverageViewOptions.h
+++ b/llvm/tools/llvm-cov/CoverageViewOptions.h
@@ -35,6 +35,9 @@
std::string ShowOutputDirectory;
std::vector<std::string> DemanglerOpts;
uint32_t TabSize;
+ std::string ProjectTitle;
+ std::string ObjectFilename;
+ std::string CreatedTimeStr;
/// \brief Change the output's stream color if the colors are enabled.
ColoredRawOstream colored_ostream(raw_ostream &OS,
@@ -47,6 +50,12 @@
/// \brief Check if a demangler has been specified.
bool hasDemangler() const { return !DemanglerOpts.empty(); }
+
+ /// \brief Check if a project title has been specified.
+ bool hasProjectTitle() const { return !ProjectTitle.empty(); }
+
+ /// \brief Check if the created time of the profile data file is available.
+ bool hasCreatedTime() const { return !CreatedTimeStr.empty(); }
};
}