[Lldb-commits] [PATCH] D82382: [lldb][NFC] Replace most uses of StringConvert in LLDB with LLVM's to_integer

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 24 10:15:41 PDT 2020


JDevlieghere added inline comments.


================
Comment at: lldb/source/Host/common/Socket.cpp:286
       host_str = host_str.substr(1, host_str.size() - 2);
-    bool ok = false;
-    port = StringConvert::ToUInt32(port_str.c_str(), UINT32_MAX, 10, &ok);
+    bool ok = llvm::to_integer(port_str, port);
     if (ok && port <= UINT16_MAX) {
----------------
Consider inlining the call?


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82382/new/

https://reviews.llvm.org/D82382





More information about the lldb-commits mailing list