[PATCH] D58298: [libObject][NFC] Use sys::path::convert_to_slash.
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 19 10:14:09 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL354364: [libObject][NFC] Use sys::path::convert_to_slash. (authored by rupprecht, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D58298?vs=187058&id=187404#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58298/new/
https://reviews.llvm.org/D58298
Files:
llvm/trunk/lib/Object/ArchiveWriter.cpp
Index: llvm/trunk/lib/Object/ArchiveWriter.cpp
===================================================================
--- llvm/trunk/lib/Object/ArchiveWriter.cpp
+++ llvm/trunk/lib/Object/ArchiveWriter.cpp
@@ -514,13 +514,9 @@
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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58298.187404.patch
Type: text/x-patch
Size: 669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190219/e392d6a0/attachment.bin>
More information about the llvm-commits
mailing list