aboutsummaryrefslogtreecommitdiff
path: root/source/Target/ProcessLaunchInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Target/ProcessLaunchInfo.cpp')
-rw-r--r--source/Target/ProcessLaunchInfo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/Target/ProcessLaunchInfo.cpp b/source/Target/ProcessLaunchInfo.cpp
index 92d9371b541f..7de55f2fdcf9 100644
--- a/source/Target/ProcessLaunchInfo.cpp
+++ b/source/Target/ProcessLaunchInfo.cpp
@@ -14,15 +14,17 @@
// Other libraries and framework includes
// Project includes
#include "lldb/Core/Debugger.h"
-#include "lldb/Core/Log.h"
#include "lldb/Host/Config.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Target/FileAction.h"
#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/Target.h"
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/StreamString.h"
#include "llvm/Support/ConvertUTF.h"
+#include "llvm/Support/FileSystem.h"
#if !defined(_WIN32)
#include <limits.h>
@@ -368,10 +370,8 @@ bool ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell(
if (working_dir) {
new_path += working_dir.GetPath();
} else {
- char current_working_dir[PATH_MAX];
- const char *cwd =
- getcwd(current_working_dir, sizeof(current_working_dir));
- if (cwd && cwd[0])
+ llvm::SmallString<64> cwd;
+ if (! llvm::sys::fs::current_path(cwd))
new_path += cwd;
}
std::string curr_path;