[NFC] Return llvm::StringRef from StringExtractor::GetStringRef.
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 21 Aug 2019 04:55:56 +0000 (04:55 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 21 Aug 2019 04:55:56 +0000 (04:55 +0000)
commitd35b42f20a48d6fd9c1f8fce095c37794d49806c
tree393063216884d10d5efef46472ada966725a2e85
parent7483005c59828482aa28e09c7a132628b4054e29
[NFC] Return llvm::StringRef from StringExtractor::GetStringRef.

This patch removes the two variant of StringExtractor::GetStringRef that
return (non-)const references to std::string. The non-const one was
being abused to reinitialize the StringExtractor and its uses are
replaced by calls to the copy asignment operator. The const variant was
refactored to return an actual llvm::StringRef.

llvm-svn: 369493
lldb/include/lldb/Utility/StringExtractor.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/tools/debugserver/source/StdStringExtractor.h
lldb/unittests/Utility/StringExtractorTest.cpp