From 0ef31b7960cad696f9d93fa50df3e2d2bee15413 Mon Sep 17 00:00:00 2001 From: Ying Yi Date: Thu, 4 Aug 2016 10:39:43 +0000 Subject: [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 --- llvm/tools/llvm-cov/CodeCoverage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp') 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 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)) { -- cgit v1.2.3