diff options
author | Zachary Turner <zturner@google.com> | 2016-08-27 15:52:29 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-08-27 15:52:29 +0000 |
commit | 26709df81deda2ef4ea143ba51caf9c3bb9b9398 (patch) | |
tree | 8bb811ce94d4a3fbf48204cf95496cc8dc530cdf /lldb/unittests/Process/gdb-remote | |
parent | 56658af2cb2329f5691b4e837b6c06aa3833f81e (diff) | |
download | bcm5719-llvm-26709df81deda2ef4ea143ba51caf9c3bb9b9398.tar.gz bcm5719-llvm-26709df81deda2ef4ea143ba51caf9c3bb9b9398.zip |
Convert some functions to use StringRef instead of c_str, len
This started as an effort to change StringExtractor to store a
StringRef internally instead of a std::string. I got that working
locally with just 1 test failure which I was unable to figure out the
cause of. But it was also a massive changelist due to a trickle
down effect of changes.
So I'm starting over, using what I learned from the first time to
tackle smaller, more isolated changes hopefully leading up to
a full conversion by the end.
At first the changes (such as in this CL) will seem mostly
a matter of preference and pointless otherwise. However, there
are some places in my larger CL where using StringRef turned 20+
lines of code into 2, drastically simplifying logic. Hopefully
once these go in they will illustrate some of the benefits of
thinking in terms of StringRef.
llvm-svn: 279917
Diffstat (limited to 'lldb/unittests/Process/gdb-remote')
-rw-r--r-- | lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h b/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h index 128ec4e8c0d..6ceeccfaf81 100644 --- a/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h +++ b/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h @@ -37,7 +37,7 @@ struct MockServer : public GDBRemoteCommunicationServer PacketResult SendPacket(llvm::StringRef payload) { - return GDBRemoteCommunicationServer::SendPacketNoLock(payload.data(), payload.size()); + return GDBRemoteCommunicationServer::SendPacketNoLock(payload); } PacketResult |