mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-19 02:03:11 +00:00
[llvm-cov] Handle native paths correctly in the text index
Treat filenames the same way in the text index as we do in the html index. This is a follow-up to r281008 (an attempt to unbreak the native_separators.c test on Windows). Patch by Maggie Yi! llvm-svn: 281062
This commit is contained in:
parent
198204b8e7
commit
7259fc9dc4
@ -15,6 +15,7 @@
|
||||
#include "RenderingSupport.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Format.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include <numeric>
|
||||
|
||||
using namespace llvm;
|
||||
@ -140,7 +141,10 @@ void CoverageReport::render(const FileCoverageSummary &File,
|
||||
auto FuncCoverageColor =
|
||||
determineCoveragePercentageColor(File.FunctionCoverage);
|
||||
auto LineCoverageColor = determineCoveragePercentageColor(File.LineCoverage);
|
||||
OS << column(File.Name, FileReportColumns[0], Column::NoTrim)
|
||||
SmallString<256> FileName = File.Name;
|
||||
sys::path::remove_dots(FileName, /*remove_dot_dots=*/true);
|
||||
sys::path::native(FileName);
|
||||
OS << column(FileName, FileReportColumns[0], Column::NoTrim)
|
||||
<< format("%*u", FileReportColumns[1],
|
||||
(unsigned)File.RegionCoverage.NumRegions);
|
||||
Options.colored_ostream(OS, FileCoverageColor) << format(
|
||||
|
Loading…
x
Reference in New Issue
Block a user