[lldb] [Utility/UriParser] Replace port==-1 with llvm::None
Use llvm::Optional<uint16_t> instead of int for port number in UriParser::Parse(), and use llvm::None to indicate missing port instead of a magic value of -1. Differential Revision: https://reviews.llvm.org/D112309
This commit is contained in:
@@ -155,7 +155,7 @@ Status PlatformAndroid::ConnectRemote(Args &args) {
|
||||
if (!m_remote_platform_sp)
|
||||
m_remote_platform_sp = PlatformSP(new PlatformAndroidRemoteGDBServer());
|
||||
|
||||
int port;
|
||||
llvm::Optional<uint16_t> port;
|
||||
llvm::StringRef scheme, host, path;
|
||||
const char *url = args.GetArgumentAtIndex(0);
|
||||
if (!url)
|
||||
|
||||
Reference in New Issue
Block a user