aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-01-15 08:41:35 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-01-15 08:41:35 +0000
commit4aab4ab340863d87f9c566b69099ce60dd8762be (patch)
treecb0a05c82bf1c07b48b0cf504549311f72d41f73 /lib/Support
parent49c0a9ac989848844f0eb8894ef7ae6b8dde3495 (diff)
downloadexternal_llvm-4aab4ab340863d87f9c566b69099ce60dd8762be.zip
external_llvm-4aab4ab340863d87f9c566b69099ce60dd8762be.tar.gz
external_llvm-4aab4ab340863d87f9c566b69099ce60dd8762be.tar.bz2
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...) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/Unix/Process.inc4
-rw-r--r--lib/Support/Windows/Process.inc4
2 files changed, 0 insertions, 8 deletions
diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc
index da440fd..5cdb11c 100644
--- a/lib/Support/Unix/Process.inc
+++ b/lib/Support/Unix/Process.inc
@@ -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());
-}
diff --git a/lib/Support/Windows/Process.inc b/lib/Support/Windows/Process.inc
index fe54eb1..913b073 100644
--- a/lib/Support/Windows/Process.inc
+++ b/lib/Support/Windows/Process.inc
@@ -220,8 +220,4 @@ const char *Process::ResetColor() {
return 0;
}
-void Process::SetWorkingDirectory(std::string Path) {
- ::_chdir(Path.c_str());
-}
-
}