[all-commits] [llvm/llvm-project] 65d444: [lldb][nfc] Factor out repeated code in DWIM Print...

Felipe de Azevedo Piovezan via All-commits all-commits at lists.llvm.org
Mon Mar 18 14:34:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 65d444b9edb895443754c13d9c008af180eb5c71
      https://github.com/llvm/llvm-project/commit/65d444b9edb895443754c13d9c008af180eb5c71
  Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
  Date:   2024-03-18 (Mon, 18 Mar 2024)

  Changed paths:
    M lldb/source/Commands/CommandObjectDWIMPrint.cpp

  Log Message:
  -----------
  [lldb][nfc] Factor out repeated code in DWIM Print (#85669)

The code that prints ValueObjects is duplicated across two different
cases of the dwim-print command, and a subsequent commit will add a
third case. As such, this commit factors out the common code into a
lambda. A free function was considered, but there is too much
function-local context required in that.

We also reword some of the comments so that they stop counting cases,
making it easier to add other cases later.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list