[driver] Use the llvm equivalent of getcwd(). Hopefully, this makes the Windows

bots recover.
rdar://12237559

llvm-svn: 180652
This commit is contained in:
Chad Rosier 2013-04-27 00:11:10 +00:00
parent 04703a6efd
commit 5a8341d6be
1 changed files with 2 additions and 3 deletions

View File

@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
#include <sys/param.h>
#include <sys/stat.h>
#include <unistd.h>
#include "Tools.h"
@ -1793,8 +1792,8 @@ static void addDebugCompDirArg(const ArgList &Args, ArgStringList &CmdArgs) {
return;
}
// Fall back to using getcwd.
char cwd[MAXPATHLEN];
if (pwd && ::getcwd(cwd, MAXPATHLEN)) {
const char *cwd = llvm::sys::Path::GetCurrentDirectory().c_str();
if (pwd && cwd) {
CmdArgs.push_back("-fdebug-compilation-dir");
CmdArgs.push_back(Args.MakeArgString(cwd));
}