aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-10-03 20:10:56 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-10-03 20:10:56 +0000
commit421b885a344e5a188fa08b4fe3b7e5aa71a37cb5 (patch)
tree210e62ca1efc2899e0805e5fdc2ed55600e50986 /source
parentf9e681086c31fca6b2129343a5416978117221c1 (diff)
downloadlldb-421b885a344e5a188fa08b4fe3b7e5aa71a37cb5.tar.gz
[JSON] Don't wrap json::Array in a value (NFC)
There's no need to wrap the just-constructed json::Array in a json::Value, we can just return that and pass ownership to the raw_ostream. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@373656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source')
-rw-r--r--source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 36fb17813..ad1a39b57 100644
--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -493,7 +493,7 @@ static const char *GetStopReasonString(StopReason stop_reason) {
return nullptr;
}
-static llvm::Expected<json::Value>
+static llvm::Expected<json::Array>
GetJSONThreadsInfo(NativeProcessProtocol &process, bool abridged) {
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD));
@@ -660,12 +660,12 @@ GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread(
// thread otherwise this packet has all the info it needs.
if (thread_index > 1) {
const bool threads_with_valid_stop_info_only = true;
- llvm::Expected<json::Value> threads_info = GetJSONThreadsInfo(
+ llvm::Expected<json::Array> threads_info = GetJSONThreadsInfo(
*m_debugged_process_up, threads_with_valid_stop_info_only);
if (threads_info) {
response.PutCString("jstopinfo:");
StreamString unescaped_response;
- unescaped_response.AsRawOstream() << *threads_info;
+ unescaped_response.AsRawOstream() << std::move(*threads_info);
response.PutStringAsRawHex8(unescaped_response.GetData());
response.PutChar(';');
} else {