forked from OSchip/llvm-project
Driver: Use sys::Process::SetWorkingDirectory, for consistency.
llvm-svn: 140434
This commit is contained in:
parent
9b92e2be30
commit
eb5348ac31
|
@ -38,17 +38,12 @@
|
|||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Support/Program.h"
|
||||
#include "llvm/Support/Process.h"
|
||||
|
||||
#include "InputInfo.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#elif defined(_WIN32)
|
||||
#include <direct.h>
|
||||
#endif
|
||||
|
||||
using namespace clang::driver;
|
||||
using namespace clang;
|
||||
|
||||
|
@ -333,7 +328,7 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
|
|||
// internally to support good use as a library, but for now we just change our
|
||||
// working directory.
|
||||
if (const Arg *A = Args->getLastArg(options::OPT__working_directory)) {
|
||||
::chdir(A->getValue(*Args));
|
||||
llvm::sys::Process::SetWorkingDirectory(A->getValue(*Args));
|
||||
}
|
||||
|
||||
Host = GetHostInfo(DefaultHostTriple.c_str());
|
||||
|
|
Loading…
Reference in New Issue