mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
[libObject][NFC] Use sys::path::convert_to_slash.
Summary: As suggested in rL353995 Reviewers: compnerd Reviewed By: compnerd Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58298 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user