1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Remove SetWorkingDirectory from the Process interface. Nothing in LLVM

or Clang is using this, and it would be hard to use it correctly given
the thread hostility of the function. Also, it never checked the return
which is rather dangerous with chdir. If someone was in fact using this,
please let me know, as well as what the usecase actually is so that
I can add it back and make it more correct and secure to use. (That
said, it's never going to be "safe" per-se, but we could at least
document the risks...)

llvm-svn: 148211
This commit is contained in:
Chandler Carruth 2012-01-15 08:41:35 +00:00
parent e3b1a7c2d7
commit d328cc2c87
3 changed files with 0 additions and 11 deletions

View File

@ -138,9 +138,6 @@ namespace sys {
/// Resets the terminals colors, or returns an escape sequence to do so.
static const char *ResetColor();
/// Change the program working directory to that given by \arg Path.
static void SetWorkingDirectory(std::string Path);
/// @}
};
}

View File

@ -293,7 +293,3 @@ const char *Process::OutputBold(bool bg) {
const char *Process::ResetColor() {
return "\033[0m";
}
void Process::SetWorkingDirectory(std::string Path) {
::chdir(Path.c_str());
}

View File

@ -220,8 +220,4 @@ const char *Process::ResetColor() {
return 0;
}
void Process::SetWorkingDirectory(std::string Path) {
::_chdir(Path.c_str());
}
}