[all-commits] [llvm/llvm-project] af97ed: [lldb] Refactor GetFormatFromCString to always che...

Dave Lee via All-commits all-commits at lists.llvm.org
Thu Feb 8 09:32:23 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af97edff70b0d9cb89729dc0d8af1d1ea101686e
      https://github.com/llvm/llvm-project/commit/af97edff70b0d9cb89729dc0d8af1d1ea101686e
  Author: Dave Lee <davelee.com at gmail.com>
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
    M lldb/include/lldb/DataFormatters/FormatManager.h
    M lldb/source/Core/FormatEntity.cpp
    M lldb/source/DataFormatters/FormatManager.cpp
    M lldb/source/Interpreter/OptionArgParser.cpp

  Log Message:
  -----------
  [lldb] Refactor GetFormatFromCString to always check for partial matches  (NFC) (#81018)

Refactors logic in `ParseInternal` that was previously calling
`GetFormatFromCString` twice, once with `partial_match_ok` set to false,
and the second time set to true.

With this change, lldb formats (ie `%@`, `%S`, etc) are checked first.
If a format is not one of those, then `GetFormatFromCString` is called
once, and now always checks for partial matches.




More information about the All-commits mailing list