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 | 9b92e2be3082e23ff5135f4dde495d6ea6510142 (patch) | |
tree | a3c60c5182995eb9e6cf3d4d736dd26d4d679c08 /llvm/lib/Support/Windows | |
parent | 44653709fdc26ae93eea9c08a82725cfc9532243 (diff) | |
download | bcm5719-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.inc | 5 |
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()); +} + } |