Author: Ebuka Ezike Date: 2026-01-19T15:04:45Z New Revision: 0fadf42fea3fab2351cd00806def4418fb36b54f
URL: https://github.com/llvm/llvm-project/commit/0fadf42fea3fab2351cd00806def4418fb36b54f DIFF: https://github.com/llvm/llvm-project/commit/0fadf42fea3fab2351cd00806def4418fb36b54f.diff LOG: [LLDB][NFC] use llvm::StringRef instead of std::string (#176748) Added: Modified: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index cbe013755f198..4fa92af59f8cd 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1599,25 +1599,25 @@ bool ProcessGDBRemote::UpdateThreadIDList() { if (m_last_stop_packet) { // Get the thread stop info StringExtractorGDBRemote &stop_info = *m_last_stop_packet; - const std::string &stop_info_str = std::string(stop_info.GetStringRef()); + const llvm::StringRef stop_info_str = stop_info.GetStringRef(); m_thread_pcs.clear(); const size_t thread_pcs_pos = stop_info_str.find(";thread-pcs:"); - if (thread_pcs_pos != std::string::npos) { + if (thread_pcs_pos != llvm::StringRef::npos) { const size_t start = thread_pcs_pos + strlen(";thread-pcs:"); const size_t end = stop_info_str.find(';', start); - if (end != std::string::npos) { - std::string value = stop_info_str.substr(start, end - start); + if (end != llvm::StringRef::npos) { + llvm::StringRef value = stop_info_str.substr(start, end - start); UpdateThreadPCsFromStopReplyThreadsValue(value); } } const size_t threads_pos = stop_info_str.find(";threads:"); - if (threads_pos != std::string::npos) { + if (threads_pos != llvm::StringRef::npos) { const size_t start = threads_pos + strlen(";threads:"); const size_t end = stop_info_str.find(';', start); - if (end != std::string::npos) { - std::string value = stop_info_str.substr(start, end - start); + if (end != llvm::StringRef::npos) { + llvm::StringRef value = stop_info_str.substr(start, end - start); if (UpdateThreadIDsFromStopReplyThreadsValue(value)) return true; } _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
