diff options
author | Rui Ueyama <ruiu@google.com> | 2017-01-06 09:38:43 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-01-06 09:38:43 +0000 |
commit | dac6169214760886e974b622eda38c25af353fcb (patch) | |
tree | 2a5078d90870a6417c172975810da44c74f6ee08 /lld | |
parent | 927ec4b5ace874af77dd0ff9b7580fe5f29884ee (diff) | |
download | bcm5719-llvm-dac6169214760886e974b622eda38c25af353fcb.tar.gz bcm5719-llvm-dac6169214760886e974b622eda38c25af353fcb.zip |
Remove lld::convertToUnixPathSeparator.
Now TarWriter takes care of path separator conversion, so we don't
need to handle that in LLD.
llvm-svn: 291221
Diffstat (limited to 'lld')
-rw-r--r-- | lld/include/lld/Core/Reproduce.h | 3 | ||||
-rw-r--r-- | lld/lib/Core/Reproduce.cpp | 12 |
2 files changed, 1 insertions, 14 deletions
diff --git a/lld/include/lld/Core/Reproduce.h b/lld/include/lld/Core/Reproduce.h index 314cb8c9471..12bbf06466f 100644 --- a/lld/include/lld/Core/Reproduce.h +++ b/lld/include/lld/Core/Reproduce.h @@ -34,9 +34,6 @@ std::string rewritePath(StringRef S); // Returns the string form of the given argument. std::string stringize(llvm::opt::Arg *Arg); - -// Replaces backslashes with slashes if Windows. -std::string convertToUnixPathSeparator(StringRef S); } #endif diff --git a/lld/lib/Core/Reproduce.cpp b/lld/lib/Core/Reproduce.cpp index e9f7ba1fb78..4f930372762 100644 --- a/lld/lib/Core/Reproduce.cpp +++ b/lld/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 Res.str(); } // Quote a given string if it contains a space character. @@ -64,13 +64,3 @@ std::string lld::stringize(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 -} |