From adcd02683856c30ba6f349279509acecd90063df Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 28 Jan 2020 20:23:46 +0100 Subject: Make llvm::StringRef to std::string conversions explicit. This is how it should've been and brings it more in line with std::string_view. There should be no functional change here. This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies. This doesn't actually modify StringRef yet, I'll do that in a follow-up. --- lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Plugins/OperatingSystem/Python') diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index 442e31c..c24af00 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -337,7 +337,7 @@ OperatingSystemPython::CreateRegisterContextForThread(Thread *thread, m_interpreter->OSPlugin_RegisterContextData(m_python_object_sp, thread->GetID()); if (reg_context_data) { - std::string value = reg_context_data->GetValue(); + std::string value = std::string(reg_context_data->GetValue()); DataBufferSP data_sp(new DataBufferHeap(value.c_str(), value.length())); if (data_sp->GetByteSize()) { RegisterContextMemory *reg_ctx_memory = new RegisterContextMemory( -- cgit v1.1