summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-09-23 23:23:36 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-09-23 23:23:36 +0000
commit9b92e2be3082e23ff5135f4dde495d6ea6510142 (patch)
treea3c60c5182995eb9e6cf3d4d736dd26d4d679c08 /llvm/lib/Support/Windows
parent44653709fdc26ae93eea9c08a82725cfc9532243 (diff)
downloadbcm5719-llvm-9b92e2be3082e23ff5135f4dde495d6ea6510142.tar.gz
bcm5719-llvm-9b92e2be3082e23ff5135f4dde495d6ea6510142.zip
sys::Process: Add a SetWorkingDirectory method.
llvm-svn: 140433
Diffstat (limited to 'llvm/lib/Support/Windows')
-rw-r--r--llvm/lib/Support/Windows/Process.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/Process.inc b/llvm/lib/Support/Windows/Process.inc
index 06a7f0054d5..fe54eb1a797 100644
--- a/llvm/lib/Support/Windows/Process.inc
+++ b/llvm/lib/Support/Windows/Process.inc
@@ -15,6 +15,7 @@
#include <psapi.h>
#include <malloc.h>
#include <io.h>
+#include <direct.h>
#ifdef __MINGW32__
#if (HAVE_LIBPSAPI != 1)
@@ -219,4 +220,8 @@ const char *Process::ResetColor() {
return 0;
}
+void Process::SetWorkingDirectory(std::string Path) {
+ ::_chdir(Path.c_str());
+}
+
}
OpenPOWER on IntegriCloud