diff options
Diffstat (limited to 'lldb/source/Host')
-rw-r--r-- | lldb/source/Host/common/FileSpec.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/common/Host.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/common/HostNativeThreadBase.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Host/common/Symbols.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/common/ThisThread.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/linux/HostInfoLinux.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/posix/PipePosix.cpp | 2 |
7 files changed, 7 insertions, 8 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index 4021e37ecf2..c8972eefd6c 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -610,7 +610,7 @@ FileSpec FileSpec::GetNormalizedPath() const { void FileSpec::Dump(Stream *s) const { if (s) { std::string path{GetPath(true)}; - s->PutCString(path.c_str()); + s->PutCString(path); char path_separator = GetPreferredPathSeparator(m_syntax); if (!m_filename && !path.empty() && path.back() != path_separator) s->PutChar(path_separator); diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 05120f4c1bf..e31930fd96c 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -539,7 +539,7 @@ Error Host::RunShellCommand(const Args &args, const FileSpec &working_dir, FileSpec tmpdir_file_spec; if (HostInfo::GetLLDBPath(ePathTypeLLDBTempSystemDir, tmpdir_file_spec)) { tmpdir_file_spec.AppendPathComponent("lldb-shell-output.%%%%%%"); - llvm::sys::fs::createUniqueFile(tmpdir_file_spec.GetPath().c_str(), + llvm::sys::fs::createUniqueFile(tmpdir_file_spec.GetPath(), output_file_path); } else { llvm::sys::fs::createTemporaryFile("lldb-shell-output.%%%%%%", "", diff --git a/lldb/source/Host/common/HostNativeThreadBase.cpp b/lldb/source/Host/common/HostNativeThreadBase.cpp index c1a09e19823..fd39e0d1e2f 100644 --- a/lldb/source/Host/common/HostNativeThreadBase.cpp +++ b/lldb/source/Host/common/HostNativeThreadBase.cpp @@ -52,8 +52,7 @@ lldb::thread_result_t HostNativeThreadBase::ThreadCreateTrampoline(lldb::thread_arg_t arg) { ThreadLauncher::HostThreadCreateInfo *info = (ThreadLauncher::HostThreadCreateInfo *)arg; - ThisThread::SetName(info->thread_name.c_str(), - HostInfo::GetMaxThreadNameLength()); + ThisThread::SetName(info->thread_name, HostInfo::GetMaxThreadNameLength()); thread_func_t thread_fptr = info->thread_fptr; thread_arg_t thread_arg = info->thread_arg; diff --git a/lldb/source/Host/common/Symbols.cpp b/lldb/source/Host/common/Symbols.cpp index 84534280cbf..461b15a07f8 100644 --- a/lldb/source/Host/common/Symbols.cpp +++ b/lldb/source/Host/common/Symbols.cpp @@ -246,7 +246,7 @@ FileSpec Symbols::LocateExecutableSymbolFile(const ModuleSpec &module_spec) { const uint32_t num_files = files.size(); for (size_t idx_file = 0; idx_file < num_files; ++idx_file) { const std::string &filename = files[idx_file]; - FileSpec file_spec(filename.c_str(), true); + FileSpec file_spec(filename, true); if (llvm::sys::fs::equivalent(file_spec.GetPath(), module_spec.GetFileSpec().GetPath())) diff --git a/lldb/source/Host/common/ThisThread.cpp b/lldb/source/Host/common/ThisThread.cpp index 2fea0a10c97..b3f9edee2e1 100644 --- a/lldb/source/Host/common/ThisThread.cpp +++ b/lldb/source/Host/common/ThisThread.cpp @@ -46,5 +46,5 @@ void ThisThread::SetName(llvm::StringRef name, int max_length) { truncated_name = truncated_name.substr(begin, count); } - SetName(truncated_name.c_str()); + SetName(truncated_name); } diff --git a/lldb/source/Host/linux/HostInfoLinux.cpp b/lldb/source/Host/linux/HostInfoLinux.cpp index 0f2ab79224c..2a01f067614 100644 --- a/lldb/source/Host/linux/HostInfoLinux.cpp +++ b/lldb/source/Host/linux/HostInfoLinux.cpp @@ -176,7 +176,7 @@ llvm::StringRef HostInfoLinux::GetDistributionId() { } }); - return g_fields->m_distribution_id.c_str(); + return g_fields->m_distribution_id; } FileSpec HostInfoLinux::GetProgramFileSpec() { diff --git a/lldb/source/Host/posix/PipePosix.cpp b/lldb/source/Host/posix/PipePosix.cpp index a653b3eae73..4e0810c1a9b 100644 --- a/lldb/source/Host/posix/PipePosix.cpp +++ b/lldb/source/Host/posix/PipePosix.cpp @@ -142,7 +142,7 @@ Error PipePosix::CreateWithUniqueName(llvm::StringRef prefix, // should try again. Error error; do { - llvm::sys::fs::createUniqueFile(tmpdir_file_spec.GetPath().c_str(), + llvm::sys::fs::createUniqueFile(tmpdir_file_spec.GetPath(), named_pipe_path); error = CreateNew(named_pipe_path, child_process_inherit); } while (error.GetError() == EEXIST); |