================
@@ -720,20 +720,24 @@ llvm::json::Object CreateRunInTerminalReverseRequest(
     req_args.push_back("--debugger-pid");
     req_args.push_back(std::to_string(debugger_pid));
   }
-  req_args.push_back("--launch-target");
-  req_args.push_back(program.str());
+
   if (!stdio.empty()) {
-    req_args.push_back("--stdio");
+    req_args.emplace_back("--stdio");
+
     std::stringstream ss;
+    std::string_view delimiter;
     for (const std::optional<std::string> &file : stdio) {
+      ss << std::exchange(delimiter, ":");
       if (file)
-        ss << *file;
-      ss << ":";
+        ss << file.value();
----------------
DrSergei wrote:

nit: I think we can keep `*file`, because `value()` performs checks that 
optional contains value. Maybe this check is skipped when we use build wihtout 
exceptions, but it looks like that we use `*` more often than `value()`

https://github.com/llvm/llvm-project/pull/175048
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to