[lldb] Change parameter type of StructuredData::ParseJSON
authorAlex Langford <alangford@apple.com>
Mon, 17 Apr 2023 23:11:07 +0000 (16:11 -0700)
committerAlex Langford <alangford@apple.com>
Tue, 18 Apr 2023 00:25:05 +0000 (17:25 -0700)
commit8bddb13c2470b95651955c61913627b31e9c99d6
treeb66310e7c607ccbea8f3c9f760414dd1a3126afc
parent8c2276f89887d0a27298a1bbbd2181fa54bbb509
[lldb] Change parameter type of StructuredData::ParseJSON

Instead of taking a `const std::string &` we can take an
`llvm::StringRef`. The motivation for this change is that many of the
callers of `ParseJSON` end up creating a temporary `std::string` from an existing
`StringRef` or `const char *` in order to satisfy the API. There's no
reason we need to do this.

Differential Revision: https://reviews.llvm.org/D148579
lldb/include/lldb/Utility/StructuredData.h
lldb/source/API/SBDebugger.cpp
lldb/source/API/SBStructuredData.cpp
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Utility/StructuredData.cpp
lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
lldb/unittests/tools/lldb-server/tests/MessageObjects.cpp