diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-21 04:55:56 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-21 04:55:56 +0000 |
commit | d35b42f20a48d6fd9c1f8fce095c37794d49806c (patch) | |
tree | 393063216884d10d5efef46472ada966725a2e85 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp | |
parent | 7483005c59828482aa28e09c7a132628b4054e29 (diff) | |
download | bcm5719-llvm-d35b42f20a48d6fd9c1f8fce095c37794d49806c.tar.gz bcm5719-llvm-d35b42f20a48d6fd9c1f8fce095c37794d49806c.zip |
[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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp index 140e2433023..064bbde8442 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp @@ -72,7 +72,7 @@ StateType GDBRemoteClientBase::SendContinuePacketAndWaitForResponse( const char stop_type = response.GetChar(); LLDB_LOGF(log, "GDBRemoteClientBase::%s () got packet: %s", __FUNCTION__, - response.GetStringRef().c_str()); + response.GetStringRef().data()); switch (stop_type) { case 'W': @@ -214,7 +214,7 @@ GDBRemoteClientBase::SendPacketAndWaitForResponseNoLock( LLDB_LOGF( log, "error: packet with payload \"%.*s\" got invalid response \"%s\": %s", - int(payload.size()), payload.data(), response.GetStringRef().c_str(), + int(payload.size()), payload.data(), response.GetStringRef().data(), (i == (max_response_retries - 1)) ? "using invalid response and giving up" : "ignoring response and waiting for another"); |