================
@@ -491,18 +493,16 @@ bool GDBRemoteCommunicationClient::GetVContSupported(char
flavor) {
m_supports_vCont_S = eLazyBoolNo;
if (SendPacketAndWaitForResponse("vCont?", response) ==
PacketResult::Success) {
- const char *response_cstr = response.GetStringRef().data();
- if (::strstr(response_cstr, ";c"))
- m_supports_vCont_c = eLazyBoolYes;
-
- if (::strstr(response_cstr, ";C"))
- m_supports_vCont_C = eLazyBoolYes;
-
- if (::strstr(response_cstr, ";s"))
- m_supports_vCont_s = eLazyBoolYes;
-
- if (::strstr(response_cstr, ";S"))
- m_supports_vCont_S = eLazyBoolYes;
+ for (llvm::StringRef flavor : llvm::split(response.GetStringRef(), ';'))
{
----------------
sedymrak wrote:
The original `flavor` variable was shadowed by the new `flavor` variable.
I've pushed a commit that renames the latter consistently with your proposal.
The new version of the method is now (still) equivalent to the original one but
there is no variable shadowing.
https://github.com/llvm/llvm-project/pull/182287
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits