================
@@ -118,7 +122,15 @@ class ProcessLaunchInfo : public ProcessInfo {
 
   bool MonitorProcess() const;
 
-  PseudoTerminal &GetPTY() { return *m_pty; }
+#ifdef _WIN32
+  PseudoConsole &GetPTY() const { return *m_pty; }
+
+  std::shared_ptr<PseudoConsole> GetPTYSP() const { return m_pty; }
+#else
+  PseudoTerminal &GetPTY() const { return *m_pty; }
+
+  std::shared_ptr<PseudoTerminal> GetPTYSP() const { return m_pty; }
+#endif
----------------
compnerd wrote:

Rather than doing this, can we do something slightly different and use a 
typealias? Something like this should work:

```c++
#if defined(_WIN32)
using PTY = PsuedoConsole;
#else
using PTY = PsuedoTerminal;
#endif

PTY &GetPTY() { return *m_pty; }
std::shared_ptr<PTY> GetPTYSP() const { return m_pty; }
```

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

Reply via email to