[lldb] [Host] Refactor Socket::DecodeHostAndPort() to use LLVM API
Refactor Socket::DecodeHostAndPort() to use LLVM API over redundant LLDB API. In particular, this means llvm::Regex, llvm::Error return type and llvm::to_integer(). While at it, change the port type from int32_t to uint16_t. The method never returns any value outside this range, and using the correct type allows us to rely on getAsInteger()'s implicit overflow check. Differential Revision: https://reviews.llvm.org/D110391
Loading
Please sign in to comment