forked from OSchip/llvm-project
Revert r291221.
Should bring back the windows bots. llvm-svn: 291263
This commit is contained in:
parent
8d4aa10960
commit
1d1f692158
|
@ -34,6 +34,9 @@ std::string rewritePath(StringRef S);
|
|||
|
||||
// Returns the string form of the given argument.
|
||||
std::string toString(llvm::opt::Arg *Arg);
|
||||
|
||||
// Replaces backslashes with slashes if Windows.
|
||||
std::string convertToUnixPathSeparator(StringRef S);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -39,7 +39,7 @@ std::string lld::relativeToRoot(StringRef Path) {
|
|||
Res = Root.substr(2);
|
||||
|
||||
path::append(Res, path::relative_path(Abs));
|
||||
return Res.str();
|
||||
return convertToUnixPathSeparator(Res);
|
||||
}
|
||||
|
||||
// Quote a given string if it contains a space character.
|
||||
|
@ -64,3 +64,13 @@ 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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue