[clang-doc] Fix failing tests on Windows

Tests on Windows were failing due to path separator differences.
Links in HTML should use posix-style paths.

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

llvm-svn: 367264
This commit is contained in:
Diego Astiazaran 2019-07-29 22:03:39 +00:00
parent a2a6f85366
commit 6ad2151b59
1 changed files with 2 additions and 0 deletions

View File

@ -252,6 +252,8 @@ static std::unique_ptr<HTMLNode> genTypeReference(const Reference &Type,
llvm::SmallString<128> Path =
computeRelativePath(Type.Path, CurrentDirectory);
llvm::sys::path::append(Path, Type.Name + ".html");
// Paths in HTML must be in posix-style
llvm::sys::path::native(Path, llvm::sys::path::Style::posix);
return genLink(Type.Name, Path);
}