diff options
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Unix/Path.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index b82371a7b6..1ee2a1cf74 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -256,6 +256,14 @@ Path::GetCurrentDirectory() { #if !defined(__native_client__) char pathname[MAXPATHLEN]; if (!getcwd(pathname, MAXPATHLEN)) { + // @LOCALMOD-BEGIN: Debug Mac SDK issues. + char error_buf[160]; + if (snprintf(error_buf, sizeof(error_buf), + "Failed to getcwd w/ MAXPATHLEN: %d\n", MAXPATHLEN) > 0) + perror(error_buf); + else + perror("Failed to getcwd"); + // @LOCALMOD-END assert(false && "Could not query current working directory."); return Path(); } |