[Lldb-commits] [lldb] [lldb][windows] make PseudoTerminal::GetPTY return a shared pointer (PR #168730)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 19 12:47:00 PST 2025


================
@@ -399,18 +399,18 @@ static Status HandleFileAction(ProcessLaunchInfo &launch_info,
     case FileAction::eFileActionOpen: {
       FileSpec file_spec = file_action->GetFileSpec();
       if (file_spec) {
-        const int primary_fd = launch_info.GetPTY().GetPrimaryFileDescriptor();
+        const int primary_fd = launch_info.GetPTY()->GetPrimaryFileDescriptor();
----------------
adrian-prantl wrote:

This looks like a worse API than before. The call sites now look like they forgot to check for a nullptr.
Could we keep the old API and have some callers use `shared_froom_this()`? Or have both APIs?

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


More information about the lldb-commits mailing list