diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-09-23 23:23:36 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-09-23 23:23:36 +0000 |
commit | bb0a6126cf1372e3ba90f0f6ff16f7f4d0381105 (patch) | |
tree | d0cb7d2de894a45f4bcccb5a5fb7bf5f4c7a88ce /lib/Support/Windows/Process.inc | |
parent | b5b7c96ce4e120297304e5cef5b4b0af8e9e8691 (diff) | |
download | external_llvm-bb0a6126cf1372e3ba90f0f6ff16f7f4d0381105.zip external_llvm-bb0a6126cf1372e3ba90f0f6ff16f7f4d0381105.tar.gz external_llvm-bb0a6126cf1372e3ba90f0f6ff16f7f4d0381105.tar.bz2 |
sys::Process: Add a SetWorkingDirectory method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Windows/Process.inc')
-rw-r--r-- | lib/Support/Windows/Process.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Support/Windows/Process.inc b/lib/Support/Windows/Process.inc index 06a7f00..fe54eb1 100644 --- a/lib/Support/Windows/Process.inc +++ b/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()); +} + } |