summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-09-21 16:01:28 +0000
committerZachary Turner <zturner@google.com>2016-09-21 16:01:28 +0000
commit95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5 (patch)
tree0e9d2a42e76e13cf5ed5d6a8f0b935a83e40ea69 /lldb/source/Plugins/Process/gdb-remote
parent07171f21d148d340115ec634be6a7f296799517d (diff)
downloadbcm5719-llvm-95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5.tar.gz
bcm5719-llvm-95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5.zip
Make lldb::Regex use StringRef.
This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 2c0a5e06c78..de7d52480bc 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -404,11 +404,11 @@ GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(
std::string regex_str = "^";
regex_str += echo_packet;
regex_str += "$";
- response_regex.Compile(regex_str.c_str());
+ response_regex.Compile(regex_str);
} else {
echo_packet_len =
::snprintf(echo_packet, sizeof(echo_packet), "qC");
- response_regex.Compile("^QC[0-9A-Fa-f]+$");
+ response_regex.Compile(llvm::StringRef("^QC[0-9A-Fa-f]+$"));
}
PacketResult echo_packet_result =
@@ -422,8 +422,7 @@ GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(
echo_response, timeout_usec, false);
if (echo_packet_result == PacketResult::Success) {
++successful_responses;
- if (response_regex.Execute(
- echo_response.GetStringRef().c_str())) {
+ if (response_regex.Execute(echo_response.GetStringRef())) {
sync_success = true;
break;
} else if (successful_responses == 1) {
OpenPOWER on IntegriCloud