labath added inline comments.
================ Comment at: lldb/source/Host/common/ProcessLaunchInfo.cpp:324-325 std::string safe_arg = Args::GetShellSafeArgument(m_shell, argv[i]); + if (safe_arg.empty()) + safe_arg = "\"\""; // Add a space to separate this arg from the previous one. ---------------- bulbazord wrote: > labath wrote: > > Shouldn't this belong inside `Args::GetShellSafeArgument`? I don't think > > there's any situation where the current behavior of the function would be > > correct (and this is the only caller of the function anyway...) > As in, we should set safe_arg to `\"\"` when `argv[I]` is the empty string > (e.g. safe_arg should never be empty)? If that's what you're suggesting, I > think that would be a reasonable thing to do. I think it is. What I'm saying is that `Args::GetShellSafeArgument(???, "")` should automatically return `"\"\"` instead of needing to fix this up afterwards... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145450/new/ https://reviews.llvm.org/D145450 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits