summaryrefslogtreecommitdiff
path: root/lib/Core/Reproduce.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-09 21:23:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-09 21:23:48 +0000
commitb047fead11133644be3dbae34b85be39ce2819e9 (patch)
tree3e7f6a4c9e5ffd7af6044225e9be2962e4d8eabf /lib/Core/Reproduce.cpp
parentc09ce7fd2d62d85dcdf370f4bef732380fca4f1b (diff)
Notes
Diffstat (limited to 'lib/Core/Reproduce.cpp')
-rw-r--r--lib/Core/Reproduce.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/Core/Reproduce.cpp b/lib/Core/Reproduce.cpp
index ab7261fa0e75b..e3629a93cbe39 100644
--- a/lib/Core/Reproduce.cpp
+++ b/lib/Core/Reproduce.cpp
@@ -39,7 +39,7 @@ std::string lld::relativeToRoot(StringRef Path) {
Res = Root.substr(2);
path::append(Res, path::relative_path(Abs));
- return convertToUnixPathSeparator(Res);
+ return path::convert_to_slash(Res);
}
// Quote a given string if it contains a space character.
@@ -64,13 +64,3 @@ std::string lld::toString(opt::Arg *Arg) {
return K + V;
return K + " " + V;
}
-
-std::string lld::convertToUnixPathSeparator(StringRef S) {
-#ifdef LLVM_ON_WIN32
- std::string Ret = S.str();
- std::replace(Ret.begin(), Ret.end(), '\\', '/');
- return Ret;
-#else
- return S;
-#endif
-}