diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Object/ArchiveWriter.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Object/ArchiveWriter.cpp b/llvm/lib/Object/ArchiveWriter.cpp index 4116ed4628e..1092b9d5c2a 100644 --- a/llvm/lib/Object/ArchiveWriter.cpp +++ b/llvm/lib/Object/ArchiveWriter.cpp @@ -514,13 +514,9 @@ std::string computeArchiveRelativePath(StringRef From, StringRef To) { for (auto ToE = sys::path::end(To); ToI != ToE; ++ToI) sys::path::append(Relative, *ToI); -#ifdef _WIN32 // Replace backslashes with slashes so that the path is portable between *nix // and Windows. - std::replace(Relative.begin(), Relative.end(), '\\', '/'); -#endif - - return Relative.str(); + return sys::path::convert_to_slash(Relative); } Error writeArchive(StringRef ArcName, ArrayRef<NewArchiveMember> NewMembers, |