From 2833321f09efd9387257d17a3ef5128841142e6f Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 12 May 2017 05:49:54 +0000 Subject: Update StructuredData::String to return StringRefs. It was returning const std::string& which was leading to unnecessary copies all over the place, and preventing people from doing things like Dict->GetValueForKeyAsString("foo", ref); llvm-svn: 302875 --- .../Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (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 0556318cc04..14bf0784dc2 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -240,8 +240,8 @@ ThreadSP OperatingSystemPython::CreateThreadFromThreadInfo( uint32_t core_number; addr_t reg_data_addr; - std::string name; - std::string queue; + llvm::StringRef name; + llvm::StringRef queue; thread_dict.GetValueForKeyAsInteger("core", core_number, UINT32_MAX); thread_dict.GetValueForKeyAsInteger("register_data_addr", reg_data_addr, @@ -266,8 +266,8 @@ ThreadSP OperatingSystemPython::CreateThreadFromThreadInfo( if (!thread_sp) { if (did_create_ptr) *did_create_ptr = true; - thread_sp.reset(new ThreadMemory(*m_process, tid, name.c_str(), - queue.c_str(), reg_data_addr)); + thread_sp.reset( + new ThreadMemory(*m_process, tid, name, queue, reg_data_addr)); } if (core_number < core_thread_list.GetSize(false)) { -- cgit v1.2.3