From: Diego Astiazaran Date: Tue, 6 Aug 2019 20:59:14 +0000 (+0000) Subject: [clang-doc] Fix paths of js in import tags X-Git-Tag: llvmorg-11-init~12577 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40fde901932726518feb24391138e65b093b7a15;p=platform%2Fupstream%2Fllvm.git [clang-doc] Fix paths of js in import tags HTML requires posix-style paths. Differential Revision: https://reviews.llvm.org/D65827 llvm-svn: 368087 --- diff --git a/clang-tools-extra/clang-doc/HTMLGenerator.cpp b/clang-tools-extra/clang-doc/HTMLGenerator.cpp index a6f374c..902684d 100644 --- a/clang-tools-extra/clang-doc/HTMLGenerator.cpp +++ b/clang-tools-extra/clang-doc/HTMLGenerator.cpp @@ -256,6 +256,8 @@ genJsScriptsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) { auto ScriptNode = llvm::make_unique(HTMLTag::TAG_SCRIPT); SmallString<128> ScriptPath = computeRelativePath("", InfoPath); llvm::sys::path::append(ScriptPath, llvm::sys::path::filename(FilePath)); + // Paths in HTML must be in posix-style + llvm::sys::path::native(ScriptPath, llvm::sys::path::Style::posix); ScriptNode->Attributes.try_emplace("src", ScriptPath); Out.emplace_back(std::move(ScriptNode)); }