diff options
author | Ying Yi <maggieyi666@gmail.com> | 2016-08-04 10:39:43 +0000 |
---|---|---|
committer | Ying Yi <maggieyi666@gmail.com> | 2016-08-04 10:39:43 +0000 |
commit | 0ef31b7960cad696f9d93fa50df3e2d2bee15413 (patch) | |
tree | 6542beae75a8741486be484315178e907d088aa9 /llvm/tools/llvm-cov/CodeCoverage.cpp | |
parent | 3d88f0c3fb090aa2c72fbbf9f8ecea526911bdda (diff) | |
download | bcm5719-llvm-0ef31b7960cad696f9d93fa50df3e2d2bee15413.tar.gz bcm5719-llvm-0ef31b7960cad696f9d93fa50df3e2d2bee15413.zip |
[LLVM-COV]Replace tabs to the space indentations in the HTML coverage report.
When using orbis-llvm-cov.exe to generate the HTML report, the HTML report
can look quite different to the source file if it includes tabs.The default
tab size is 2 spaces instead of 8 spaces. A command line switch is
be added to set the tab size.
Differential Revision: https://reviews.llvm.org/D23087
llvm-svn: 277715
Diffstat (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/CodeCoverage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index 494912ed313..2853867aafb 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -584,6 +584,10 @@ int CodeCoverageTool::show(int argc, const char **argv, cl::alias ShowOutputDirectoryA("o", cl::desc("Alias for --output-dir"), cl::aliasopt(ShowOutputDirectory)); + cl::opt<uint32_t> TabSize( + "tab-size", cl::Hidden, cl::init(2), + cl::desc("Set tab size for the HTML coverage report (default = 2)")); + auto Err = commandLineParser(argc, argv); if (Err) return Err; @@ -596,6 +600,7 @@ int CodeCoverageTool::show(int argc, const char **argv, ViewOpts.ShowExpandedRegions = ShowExpansions; ViewOpts.ShowFunctionInstantiations = ShowInstantiations; ViewOpts.ShowOutputDirectory = ShowOutputDirectory; + ViewOpts.TabSize = TabSize; if (ViewOpts.hasOutputDirectory()) { if (auto E = sys::fs::create_directories(ViewOpts.ShowOutputDirectory)) { |