[Lldb-commits] [lldb] [lldb-dap] Ensure the IO forwarding threads are managed by the DAP object lifecycle. (PR #120457)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 20 02:37:51 PST 2024


================
@@ -52,16 +52,24 @@ struct StreamDescriptor {
 struct InputStream {
   StreamDescriptor descriptor;
 
-  bool read_full(std::ofstream *log, size_t length, std::string &text);
+  explicit InputStream(StreamDescriptor descriptor)
+      : descriptor(std::move(descriptor)) {};
 
-  bool read_line(std::ofstream *log, std::string &line);
+  bool read_full(std::optional<std::ofstream> &log, size_t length,
----------------
labath wrote:

The same goes for all of these, I don't think reference-to-optional improves things here.

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


More information about the lldb-commits mailing list