forked from OSchip/llvm-project
[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 llvm-svn: 354364
This commit is contained in:
parent
0b3b9424ca
commit
d138b1266a
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue