[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

Adrian Vogelsgesang via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 6 13:02:43 PST 2025


================
@@ -0,0 +1,152 @@
+//===-- Transport.cpp -----------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Transport.h"
+#include "Protocol.h"
+#include "lldb/Utility/IOObject.h"
+#include "lldb/Utility/Status.h"
+#include "lldb/lldb-enumerations.h"
+#include "lldb/lldb-forward.h"
+#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/Error.h"
+#include "llvm/Support/raw_ostream.h"
+#include <utility>
+
+using namespace llvm;
+using namespace lldb;
+using namespace lldb_private;
+using namespace lldb_dap;
+using namespace lldb_dap::protocol;
+
+static Status ReadFull(IOObjectSP &descriptor, size_t length,
+                       std::string &text) {
----------------
vogelsgesang wrote:

can we make this an `Expected<std::string>` (or something similar) to avoid the output parameter here?

https://github.com/llvm/llvm-project/pull/130026


More information about the lldb-commits mailing list