From: Chad Rosier Date: Sat, 27 Apr 2013 00:11:10 +0000 (+0000) Subject: [driver] Use the llvm equivalent of getcwd(). Hopefully, this makes the Windows X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1c4ac314f69b1590dd3046233b6530cc154ebb5;p=clang [driver] Use the llvm equivalent of getcwd(). Hopefully, this makes the Windows bots recover. rdar://12237559 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180652 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index dec2ba5cec..321894ae00 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -#include #include #include #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)); }