diff options
author | Michał Górny <mgorny@moritz.systems> | 2021-10-27 17:52:45 +0200 |
---|---|---|
committer | Michał Górny <mgorny@moritz.systems> | 2021-10-28 09:57:50 +0200 |
commit | 073c5d0e4706f14b599f62c7bb115b843d0e4962 (patch) | |
tree | 59a29f76fe12d06826499d48bb6543cc4fe90084 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | |
parent | 824bf908194c9267f1f09065ba8e41d7969006ab (diff) | |
download | llvm-073c5d0e4706f14b599f62c7bb115b843d0e4962.zip llvm-073c5d0e4706f14b599f62c7bb115b843d0e4962.tar.gz llvm-073c5d0e4706f14b599f62c7bb115b843d0e4962.tar.bz2 |
[lldb] [Host/Socket] Make DecodeHostAndPort() return a dedicated struct
Differential Revision: https://reviews.llvm.org/D112629
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 27acf7e..da64531 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -3917,12 +3917,8 @@ lldb_private::process_gdb_remote::LLGSArgToURL(llvm::StringRef url_arg, if (url_arg.startswith(":")) host_port.insert(0, "localhost"); - std::string host_str; - std::string port_str; - uint16_t port; // Try parsing the (preprocessed) argument as host:port pair. - if (!llvm::errorToBool( - Socket::DecodeHostAndPort(host_port, host_str, port_str, port))) + if (!llvm::errorToBool(Socket::DecodeHostAndPort(host_port).takeError())) return (reverse_connect ? "connect://" : "listen://") + host_port; // If none of the above applied, interpret the argument as UNIX socket path. |