summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Host')
-rw-r--r--lldb/source/Host/linux/Host.cpp4
-rw-r--r--lldb/source/Host/windows/Host.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index ca2084d62e5..8acf4a94e5b 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -323,7 +323,7 @@ static bool GetProcessAndStatInfo(lldb::pid_t pid,
char *next_var = (char *)buf_sp->GetBytes();
char *end_buf = next_var + buf_sp->GetByteSize();
while (next_var < end_buf && 0 != *next_var) {
- info_env.AppendArgument(next_var);
+ info_env.AppendArgument(llvm::StringRef(next_var));
next_var += strlen(next_var) + 1;
}
@@ -340,7 +340,7 @@ static bool GetProcessAndStatInfo(lldb::pid_t pid,
char *next_arg = cmd + strlen(cmd) + 1;
end_buf = cmd + buf_sp->GetByteSize();
while (next_arg < end_buf && 0 != *next_arg) {
- info_args.AppendArgument(next_arg);
+ info_args.AppendArgument(llvm::StringRef(next_arg));
next_arg += strlen(next_arg) + 1;
}
}
diff --git a/lldb/source/Host/windows/Host.cpp b/lldb/source/Host/windows/Host.cpp
index 9fbea89cb9e..e4a6ebe07f1 100644
--- a/lldb/source/Host/windows/Host.cpp
+++ b/lldb/source/Host/windows/Host.cpp
@@ -273,7 +273,7 @@ Error Host::ShellExpandArguments(ProcessLaunchInfo &launch_info) {
if (!str_sp)
continue;
- launch_info.GetArguments().AppendArgument(str_sp->GetValue().c_str());
+ launch_info.GetArguments().AppendArgument(str_sp->GetValue());
}
}
OpenPOWER on IntegriCloud