summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
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/Unix
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/Unix')
-rw-r--r--llvm/lib/Support/Unix/Process.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc
index 5cdb11ccebc..da440fd48f3 100644
--- a/llvm/lib/Support/Unix/Process.inc
+++ b/llvm/lib/Support/Unix/Process.inc
@@ -293,3 +293,7 @@ const char *Process::OutputBold(bool bg) {
const char *Process::ResetColor() {
return "\033[0m";
}
+
+void Process::SetWorkingDirectory(std::string Path) {
+ ::chdir(Path.c_str());
+}
OpenPOWER on IntegriCloud