[llvm-cov] Use the native path in the coverage report.

The coverage reports contain the source or binary file paths. On Windows, 
the file path might contain the seperators of both '/' and '\'. This patch 
uses the native path in the coverage reports. For example, on Windows, 
all '/' are converted to '\'.

Differential Revision: https://reviews.llvm.org/D23922

llvm-svn: 280061
This commit is contained in:
Ying Yi
2016-08-30 07:01:37 +00:00
parent 80a9579db9
commit 76eb219c9b
6 changed files with 33 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ std::string CoveragePrinter::getOutputPath(StringRef Path, StringRef Extension,
auto PathFilename = (sys::path::filename(Path) + "." + Extension).str();
sys::path::append(FullPath, PathFilename);
sys::path::native(FullPath);
return FullPath.str();
}