diff options
author | Zachary Turner <zturner@google.com> | 2017-05-12 05:49:54 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-05-12 05:49:54 +0000 |
commit | 2833321f09efd9387257d17a3ef5128841142e6f (patch) | |
tree | 734c009de6f4895529effceec687d377434ba2d9 /lldb/source/Plugins/OperatingSystem/Python | |
parent | 41c99364602a6965c30be674d75451ad87658d8c (diff) | |
download | bcm5719-llvm-2833321f09efd9387257d17a3ef5128841142e6f.tar.gz bcm5719-llvm-2833321f09efd9387257d17a3ef5128841142e6f.zip |
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
Diffstat (limited to 'lldb/source/Plugins/OperatingSystem/Python')
-rw-r--r-- | lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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)) { |