[lldb][NFCI] Minor cleanups to StructuredData::GetObjectForDotSeparatedPath
authorAlex Langford <alangford@apple.com>
Wed, 5 Jul 2023 18:18:23 +0000 (11:18 -0700)
committerAlex Langford <alangford@apple.com>
Thu, 6 Jul 2023 15:51:54 +0000 (08:51 -0700)
commit8f7e41d0400ecc41f8120e330baed15b0d203036
tree4b04edbdc28efd0a02e4d07581d93e77d06289d4
parentfc55b0b38446be8948a291057b3086b4a01fe0a7
[lldb][NFCI] Minor cleanups to StructuredData::GetObjectForDotSeparatedPath

This accomplishes a few minor things:
- Removed unnecessary uses of `this->`
- Removed an unnecessary std::string allocation.
- Removed some nesting to improve readability using early returns where
  it makes sense.
- Replaced `strtoul` with `llvm::to_integer` which avoids another
  std::string allocation.
- Removed braces from single statement conditions, removed
  else-after-returns.

Differential Revision: https://reviews.llvm.org/D154534
lldb/source/Utility/StructuredData.cpp