[all-commits] [llvm/llvm-project] 09a879: Simplify Target::RunStopHooks()

Julian Lettner via All-commits all-commits at lists.llvm.org
Mon Mar 3 11:45:55 PST 2025


  Branch: refs/heads/users/yln/lldb-simplify-Target_RunStopHooks
  Home:   https://github.com/llvm/llvm-project
  Commit: 09a879a199cebb5d693c25878249f73a02aaa744
      https://github.com/llvm/llvm-project/commit/09a879a199cebb5d693c25878249f73a02aaa744
  Author: Julian Lettner <jlettner at apple.com>
  Date:   2025-03-03 (Mon, 03 Mar 2025)

  Changed paths:
    M lldb/include/lldb/Target/Target.h
    M lldb/source/Target/Target.cpp

  Log Message:
  -----------
  Simplify Target::RunStopHooks()

Introduce `StopHookResult::NoPreference` and
simplify control flow in `Target::RunStopHooks()`.

The algorithm is (in order):
1. "Auto continue" set on any hook -> continue
2. "Stop demanded" by any hook -> stop
3. "Continue requested" by any hook -> continue
4. No hooks, or "no preference" only (default
   stance) -> stop

The new `NoPreference` lets us keep the default
distinguishing case 3. and 4.



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