[all-commits] [llvm/llvm-project] 8f7e41: [lldb][NFCI] Minor cleanups to StructuredData::Get...

Alex via All-commits all-commits at lists.llvm.org
Thu Jul 6 08:54:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8f7e41d0400ecc41f8120e330baed15b0d203036
      https://github.com/llvm/llvm-project/commit/8f7e41d0400ecc41f8120e330baed15b0d203036
  Author: Alex Langford <alangford at apple.com>
  Date:   2023-07-06 (Thu, 06 Jul 2023)

  Changed paths:
    M lldb/source/Utility/StructuredData.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list